--------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\hanna\Dropbox\PC\Documents\PaperProjects\Paper-Effective resistance\Code\ReplicationMaterial\Output_Main.l
> og
  log type:  text
 opened on:  17 Oct 2019, 09:38:26

. 
. set more off

. version 13.0

. clear

. 
end of do-file

. do "C:\Users\hanna\AppData\Local\Temp\STD00000000.tmp"

. 
. use "dataForAnalysis_v3.dta", clear
(Written by R.              )

. 
. 
. ** Trend in restrictions over time
. destring YEAR, replace
YEAR: all characters numeric; replaced as int

. drop if YEAR<1994
(1,628 observations deleted)

. preserve

. collapse (mean) RESTRICT_COUNTdom RESTRICT_COUNTdom2, by(YEAR)

. tab RESTRICT_COUNTdom2 if YEAR==1994

     (mean) |
RESTRICT_CO |
    UNTdom2 |      Freq.     Percent        Cum.
------------+-----------------------------------
   .7748344 |          1      100.00      100.00
------------+-----------------------------------
      Total |          1      100.00

. tab RESTRICT_COUNTdom2 if YEAR==1998

     (mean) |
RESTRICT_CO |
    UNTdom2 |      Freq.     Percent        Cum.
------------+-----------------------------------
   .8513514 |          1      100.00      100.00
------------+-----------------------------------
      Total |          1      100.00

. tab RESTRICT_COUNTdom2 if YEAR==2016

     (mean) |
RESTRICT_CO |
    UNTdom2 |      Freq.     Percent        Cum.
------------+-----------------------------------
        1.4 |          1      100.00      100.00
------------+-----------------------------------
      Total |          1      100.00

. #delimit ;
delimiter now ;
. twoway line RESTRICT_COUNTdom2 YEAR, scheme(s1mono)
> xscale(range(1994 2016))  xlabel(1994(2)2016) 
> yscale(range(0 2)) ylabel(0 (0.5) 2)
> color("gray") lwidth(1.2)
> ytitle("Mean number of restriction types", size(large)) 
> xtitle("Time in years", size(large)) ;

. #delimit cr
delimiter now cr
. graph export ".\Figures\Manuscript_Figure1.png", replace
(file .\Figures\Manuscript_Figure1.png written in PNG format)

. restore

. 
. 
. ** Data management
. drop if YEAR>2007 | YEAR<1994
(1,826 observations deleted)

. xtset cowcode YEAR
       panel variable:  cowcode (unbalanced)
        time variable:  YEAR, 1994 to 2007, but with a gap
                delta:  1 unit

. 
. ** Labels
. do "VarLabels.do"

. 
. 
. 
. label var RESTRICT_COUNTdomlag1 "Restrictions"

. label var PTS_Slag1 "Political Terror Scale" 

. label var hrgroupslag1 "Human rights CSOs"

. label var hrnewslag1 "Human rights news"

. label var protest_ClarkRegan_loglag1 "Protest count"

. label var UCDP_armedConflictlag1 "Armed conflict"

. label var PR_freedomHouselag1 "Political rights"

. label var PR_freedomHouselag1_sq "Political rights sq." 

. label var gdp_pc_constantUS2010lag1 "GDP per capita"

. label var gdp_pc_constantUS2010lag1_sq "GDP per capita sq." 

. label var KOFGIlag1 "Globalization"

. label var KOFGIlag1_sq "Globalization sq."

. label var populationlag1 "Population size"

. label var urgentActionslag1 "Urgent Actions (lag 1 yr)"

. label var urgentActions "Urgent Actions"

. label var shamingINGO "INGO shaming"

. label var shamingINGOlag1 "INGO shaming (lag 1 yr)"

. label var fhbest "Political rights best"

. label var fhworst "Political rights worst" 

. label var deathpenalty "Death penalty"

. 
end of do-file

. 
. 
. **************************************************************
. * Model 1: Negative binomial with robust standard errors
. **************************************************************
. set seed 1234

. #delimit ;
delimiter now ;
. nbreg urgentActions c.RESTRICT_COUNTdomlag1##c.RESTRICT_COUNTdomlag1, vce(cluster cowcode) ;

Fitting Poisson model:

Iteration 0:   log pseudolikelihood = -5146.6988  
Iteration 1:   log pseudolikelihood = -5146.3488  
Iteration 2:   log pseudolikelihood = -5146.3487  

Fitting constant-only model:

Iteration 0:   log pseudolikelihood = -3238.3361  
Iteration 1:   log pseudolikelihood = -2754.4031  
Iteration 2:   log pseudolikelihood = -2747.8159  
Iteration 3:   log pseudolikelihood = -2747.8088  
Iteration 4:   log pseudolikelihood = -2747.8088  

Fitting full model:

Iteration 0:   log pseudolikelihood = -2641.3025  
Iteration 1:   log pseudolikelihood =  -2620.069  
Iteration 2:   log pseudolikelihood = -2595.3114  
Iteration 3:   log pseudolikelihood = -2595.2278  
Iteration 4:   log pseudolikelihood = -2595.2278  

Negative binomial regression                    Number of obs     =      1,691
                                                Wald chi2(2)      =      77.84
Dispersion           = mean                     Prob > chi2       =     0.0000
Log pseudolikelihood = -2595.2278               Pseudo R2         =     0.0555

                                                                 (Std. Err. adjusted for 171 clusters in cowcode)
-----------------------------------------------------------------------------------------------------------------
                                                |               Robust
                                  urgentActions |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
------------------------------------------------+----------------------------------------------------------------
                          RESTRICT_COUNTdomlag1 |   .9293579   .1210592     7.68   0.000     .6920862     1.16663
                                                |
c.RESTRICT_COUNTdomlag1#c.RESTRICT_COUNTdomlag1 |  -.0789273   .0124615    -6.33   0.000    -.1033514   -.0545031
                                                |
                                          _cons |  -.4647532   .1604788    -2.90   0.004    -.7792859   -.1502205
------------------------------------------------+----------------------------------------------------------------
                                       /lnalpha |   1.168785   .0982443                        .97623     1.36134
------------------------------------------------+----------------------------------------------------------------
                                          alpha |   3.218081    .316158                       2.65443    3.901419
-----------------------------------------------------------------------------------------------------------------

. #delimit cr
delimiter now cr
. 
. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |      1,691 -2747.809  -2595.228       4    5198.456   5220.188
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. mat es_ic = r(S)

. mat list es_ic

es_ic[1,6]
            N         ll0          ll          df         AIC         BIC
.        1691  -2747.8088  -2595.2278           4   5198.4555   5220.1878

. local AIC: display %4.1f es_ic[1,5]

. local BIC: display %4.1f es_ic[1,6]

. local LL: display %4.1f es_ic[1,3]

. outreg2 using ".\Tables\Manuscript_Table1.doc", replace ///
>  ctitle("Model 1") label  eqdrop(lnalpha) dec(3) ///
> alpha(0.001, 0.01, 0.05, 0.1) symbol(***,**, *, +) ///
> addtext(Log-Likelihood, `LL', BIC, `BIC', AIC, `AIC')
.\Tables\Manuscript_Table1.doc
dir : seeout

. 
. margins, at(RESTRICT_COUNTdomlag1 = (0 6)) contrast(atcontrast(r)) //   9.051235   2.416684      4.314622    13.78785

Contrasts of adjusted predictions
Model VCE    : Robust

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           0

2._at        : RESTRI~mlag1    =           6

------------------------------------------------
             |         df        chi2     P>chi2
-------------+----------------------------------
         _at |          1       14.03     0.0002
------------------------------------------------

--------------------------------------------------------------
             |            Delta-method
             |   Contrast   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
         _at |
   (2 vs 1)  |   9.051235   2.416684      4.314622    13.78785
--------------------------------------------------------------

. margins, at(RESTRICT_COUNTdomlag1 = (6 10)) contrast(atcontrast(r)) // -7.129509   2.383362     -11.80081   -2.458206

Contrasts of adjusted predictions
Model VCE    : Robust

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           6

2._at        : RESTRI~mlag1    =          10

------------------------------------------------
             |         df        chi2     P>chi2
-------------+----------------------------------
         _at |          1        8.95     0.0028
------------------------------------------------

--------------------------------------------------------------
             |            Delta-method
             |   Contrast   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
         _at |
   (2 vs 1)  |  -7.129509   2.383362     -11.80081   -2.458206
--------------------------------------------------------------

. 
. margins, at(RESTRICT_COUNTdomlag1 = (0(1)10) )

Adjusted predictions                            Number of obs     =      1,691
Model VCE    : Robust

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           0

2._at        : RESTRI~mlag1    =           1

3._at        : RESTRI~mlag1    =           2

4._at        : RESTRI~mlag1    =           3

5._at        : RESTRI~mlag1    =           4

6._at        : RESTRI~mlag1    =           5

7._at        : RESTRI~mlag1    =           6

8._at        : RESTRI~mlag1    =           7

9._at        : RESTRI~mlag1    =           8

10._at       : RESTRI~mlag1    =           9

11._at       : RESTRI~mlag1    =          10

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   .6282902   .1008273     6.23   0.000     .4306724     .825908
          2  |    1.47061   .2014695     7.30   0.000     1.075737    1.865483
          3  |   2.939542   .5017851     5.86   0.000     1.956061    3.923022
          4  |   5.017718   1.063681     4.72   0.000     2.932941    7.102495
          5  |    7.31438   1.760965     4.15   0.000     3.862952    10.76581
          6  |   9.105284   2.298769     3.96   0.000     4.599779    13.61079
          7  |   9.679526    2.40082     4.03   0.000     4.974005    14.38505
          8  |   8.787378   2.047349     4.29   0.000     4.774647    12.80011
          9  |   6.812542   1.503967     4.53   0.000      3.86482    9.760264
         10  |   4.510282   1.060769     4.25   0.000     2.431213    6.589351
         11  |   2.550016   .7572056     3.37   0.001      1.06592    4.034112
------------------------------------------------------------------------------

. marginsplot, recast(line) recastci(rarea)  ///
> yscale(range(0 16))  ylabel(0(2)16) ///
> plotopt(color(gs0) lwidth(1) ) ///
> ciopt(color(gs6) fintensity(10) lcolor(gs16) ) ///
> xtitle("Count of restriction types", size(large)) ///
> ytitle("Predicted number of UAs", size(large)) ///
> title("Model 1", size(large)) ///
> scheme(s1mono)

  Variables that uniquely identify margins: RESTRICT_COUNTdomlag1

. 
. 
. **************************************************************
. * Model 2: Negative binomial with robust se standard errors and covariates
. **************************************************************
. set seed 1234

. #delimit ;
delimiter now ;
. nbreg urgentActions c.RESTRICT_COUNTdomlag1##c.RESTRICT_COUNTdomlag1
> PTS_Slag1 hrgroupslag1 hrnewslag1 
> protest_ClarkRegan_loglag1 UCDP_armedConflictlag1 
> PR_freedomHouselag1 PR_freedomHouselag1_sq 
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1, vce(cluster cowcode);

Fitting Poisson model:

Iteration 0:   log pseudolikelihood = -12097.228  
Iteration 1:   log pseudolikelihood = -6461.1605  
Iteration 2:   log pseudolikelihood = -4211.5694  
Iteration 3:   log pseudolikelihood = -2984.5376  
Iteration 4:   log pseudolikelihood = -2885.7385  
Iteration 5:   log pseudolikelihood = -2884.4009  
Iteration 6:   log pseudolikelihood = -2884.4002  
Iteration 7:   log pseudolikelihood = -2884.4002  

Fitting constant-only model:

Iteration 0:   log pseudolikelihood = -2485.4691  
Iteration 1:   log pseudolikelihood = -2141.4633  
Iteration 2:   log pseudolikelihood = -2139.1792  
Iteration 3:   log pseudolikelihood = -2139.1783  
Iteration 4:   log pseudolikelihood = -2139.1783  

Fitting full model:

Iteration 0:   log pseudolikelihood = -2008.0198  
Iteration 1:   log pseudolikelihood = -1849.9466  
Iteration 2:   log pseudolikelihood = -1838.0439  
Iteration 3:   log pseudolikelihood = -1837.8838  
Iteration 4:   log pseudolikelihood = -1837.8838  

Negative binomial regression                    Number of obs     =      1,250
                                                Wald chi2(14)     =     293.87
Dispersion           = mean                     Prob > chi2       =     0.0000
Log pseudolikelihood = -1837.8838               Pseudo R2         =     0.1408

                                                                 (Std. Err. adjusted for 147 clusters in cowcode)
-----------------------------------------------------------------------------------------------------------------
                                                |               Robust
                                  urgentActions |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
------------------------------------------------+----------------------------------------------------------------
                          RESTRICT_COUNTdomlag1 |   .5123837   .1068206     4.80   0.000     .3030193    .7217482
                                                |
c.RESTRICT_COUNTdomlag1#c.RESTRICT_COUNTdomlag1 |  -.0390509    .010954    -3.56   0.000    -.0605203   -.0175815
                                                |
                                      PTS_Slag1 |   .5949085   .0968491     6.14   0.000     .4050876    .7847293
                                   hrgroupslag1 |   .0022435   .0027251     0.82   0.410    -.0030977    .0075847
                                     hrnewslag1 |   .1792817   .0522254     3.43   0.001     .0769217    .2816417
                     protest_ClarkRegan_loglag1 |    .326426   .0924908     3.53   0.000     .1451474    .5077047
                         UCDP_armedConflictlag1 |   .3436281   .2488937     1.38   0.167    -.1441947    .8314509
                            PR_freedomHouselag1 |   .5651825   .2300539     2.46   0.014     .1142851     1.01608
                         PR_freedomHouselag1_sq |  -.0572693   .0277183    -2.07   0.039    -.1115961   -.0029424
                      gdp_pc_constantUS2010lag1 |   .7277702   .3258842     2.23   0.026     .0890489    1.366491
                   gdp_pc_constantUS2010lag1_sq |  -.2539497    .122639    -2.07   0.038    -.4943178   -.0135817
                                      KOFGIlag1 |   .0993768   .0432022     2.30   0.021      .014702    .1840516
                                   KOFGIlag1_sq |  -.0008718   .0004095    -2.13   0.033    -.0016745   -.0000691
                                 populationlag1 |   .0919071   .1661601     0.55   0.580    -.2337607    .4175748
                                          _cons |    -6.0889   1.229536    -4.95   0.000    -8.498746   -3.679054
------------------------------------------------+----------------------------------------------------------------
                                       /lnalpha |   .4998763   .1199812                      .2647175    .7350352
------------------------------------------------+----------------------------------------------------------------
                                          alpha |   1.648517   .1977911                      1.303063    2.085555
-----------------------------------------------------------------------------------------------------------------

. #delimit cr
delimiter now cr
. capture drop sample

. gen sample = 1 if e(sample)==1
(1,632 missing values generated)

. 
. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |      1,250 -2139.178  -1837.884      16    3707.768   3789.862
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. mat es_ic = r(S)

. local AIC: display %4.1f es_ic[1,5]

. local BIC: display %4.1f es_ic[1,6]

. local LL: display %4.1f es_ic[1,3]

. outreg2 using ".\Tables\Manuscript_Table1.doc", append ///
>  ctitle("Model 2") label  eqdrop(lnalpha) dec(3) ///
> alpha(0.001, 0.01, 0.05, 0.1) symbol(***,**, *, +) ///
> addtext(Log-Likelihood, `LL', BIC, `BIC', AIC, `AIC')
.\Tables\Manuscript_Table1.doc
dir : seeout

. 
. margins, at(RESTRICT_COUNTdomlag1 = (0 7)) contrast(atcontrast(r)) //  4.391923   1.191021      2.432868    6.350978

Contrasts of predictive margins
Model VCE    : Robust

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           0

2._at        : RESTRI~mlag1    =           7

------------------------------------------------
             |         df        chi2     P>chi2
-------------+----------------------------------
         _at |          1       13.60     0.0002
------------------------------------------------

--------------------------------------------------------------
             |            Delta-method
             |   Contrast   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
         _at |
   (2 vs 1)  |   4.391923   1.191021      2.057565    6.726281
--------------------------------------------------------------

. margins, at(RESTRICT_COUNTdomlag1 = (7 10)) contrast(atcontrast(r)) //  -1.974416   1.095854     -3.776937   -.1718962

Contrasts of predictive margins
Model VCE    : Robust

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           7

2._at        : RESTRI~mlag1    =          10

------------------------------------------------
             |         df        chi2     P>chi2
-------------+----------------------------------
         _at |          1        3.25     0.0716
------------------------------------------------

--------------------------------------------------------------
             |            Delta-method
             |   Contrast   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
         _at |
   (2 vs 1)  |  -1.974416   1.095854     -4.122252    .1734189
--------------------------------------------------------------

. 
. margins, at(RESTRICT_COUNTdomlag1 = (0(1)10) ) post

Predictive margins                              Number of obs     =      1,250
Model VCE    : Robust

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           0

2._at        : RESTRI~mlag1    =           1

3._at        : RESTRI~mlag1    =           2

4._at        : RESTRI~mlag1    =           3

5._at        : RESTRI~mlag1    =           4

6._at        : RESTRI~mlag1    =           5

7._at        : RESTRI~mlag1    =           6

8._at        : RESTRI~mlag1    =           7

9._at        : RESTRI~mlag1    =           8

10._at       : RESTRI~mlag1    =           9

11._at       : RESTRI~mlag1    =          10

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   1.014498   .1702651     5.96   0.000     .6807842    1.348211
          2  |   1.628609   .2237345     7.28   0.000     1.190098    2.067121
          3  |   2.418041   .3748348     6.45   0.000     1.683378    3.152703
          4  |   3.320406   .6166537     5.38   0.000     2.111786    4.529025
          5  |   4.216961   .8844102     4.77   0.000     2.483548    5.950373
          6  |   4.953233   1.097842     4.51   0.000     2.801503    7.104964
          7  |   5.380949   1.195971     4.50   0.000      3.03689    7.725009
          8  |   5.406421   1.174319     4.60   0.000     3.104798    7.708044
          9  |   5.023908   1.097401     4.58   0.000     2.873041    7.174775
         10  |   4.317719   1.049957     4.11   0.000      2.25984    6.375597
         11  |   3.432005   1.043504     3.29   0.001     1.386774    5.477235
------------------------------------------------------------------------------

. display _b[8._at] - _b[11._at]          
1.9744164

. display _b[8._at] - _b[1._at]           
4.3919234

. test _b[8._at] = _b[11._at] 

 ( 1)  8._at - 11._at = 0

           chi2(  1) =    3.25
         Prob > chi2 =    0.0716

. test _b[8._at] = _b[1._at] 

 ( 1)  - 1bn._at + 8._at = 0

           chi2(  1) =   13.60
         Prob > chi2 =    0.0002

. marginsplot, recast(line) recastci(rarea)  ///
> yscale(range(0 10))  ylabel(0(2)10) ///
> plotopt(color(gs0) lwidth(1) ) ///
> ciopt(color(gs6) fintensity(10) lcolor(gs16) ) ///
> xtitle("Count of restriction types", size(large)) ///
> ytitle("Predicted number of UAs", size(large)) ///
> title("Model 2", size(large)) ///
> scheme(s1mono)

  Variables that uniquely identify margins: RESTRICT_COUNTdomlag1

. graph export ".\Figures\Manuscript_Figure3a.png", replace
(file .\Figures\Manuscript_Figure3a.png written in PNG format)

. 
. 
. **************************************************************
. ** Summary stats, and other statistics
. **************************************************************
. 
. ** Appendix 1: Correlation matrix between restriction types
. mkcorr SOME_BANNED VISIT_RESTRICT TRAVEL_RESTRICT FUNDING_DOM ///
>   FUNDING_INT REGISTRATION_PROBLEMS CENSOR HARASS_AMOUNT_bi SURVEIL_bi  ///
>   ARREST_bi KILLING_bi if sample==1, log(Appendix_TableS1) replace
(note: file Appendix_TableS1.log not found)

. 
. 
. ** Appendix 2: Summary statistics table
. estpost summarize urgentActions urgentActionslag1 shamingINGO shamingINGOlag1 RESTRICT_COUNTdomlag1 ///
> PTS_Slag1 hrgroupslag1 hrnewslag1 protest_ClarkRegan_loglag1 UCDP_armedConflictlag1 ///
> PR_freedomHouselag1 PR_freedomHouselag1_sq gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq ///
> KOFGIlag1 KOFGIlag1_sq populationlag1 fhbest fhworst deathpenalty if sample==1, detail

             |  e(count)   e(sum_w)    e(mean)     e(Var)      e(sd)  e(skewn~)  e(kurto~)     e(sum)     e(min)     e(max) 
-------------+--------------------------------------------------------------------------------------------------------------
urgentActi~s |      1250       1250     2.2024   34.39055   5.864345   5.603354   43.30247       2753          0         71 
urgentA~lag1 |      1250       1250     2.2768   37.32925   6.109766   5.720434   45.12244       2846          0         71 
 shamingINGO |      1210       1210   .3090909   1.646319    1.28309   6.902453    68.6988        374          0         19 
shamingING~1 |      1205       1205    .340249   1.742938   1.320204   6.487751   61.76133        410          0         19 
RESTRI~mlag1 |      1250       1250      1.772   7.324275    2.70634    1.91553   5.966477       2215          0         10 
   PTS_Slag1 |      1250       1250     2.5912    1.19624   1.093727   .2698307   2.413766       3239          1          5 
hrgroupslag1 |      1250       1250      70.32   2238.789   47.31585   1.794611   7.660016      87900          7        331 
  hrnewslag1 |      1250       1250      .3416   1.231495   1.109727   6.526315    60.6551        427          0       15.5 
protes~glag1 |      1250       1250    .899584   .7843859   .8856556   .6385263   2.502474    1124.48          0    3.73767 
UCDP_armed~1 |      1250       1250       .156   .1317694   .3630006   1.896072   4.595091        195          0          1 
PR_freedom~1 |      1250       1250     3.6136   4.503098    2.12205   .1871588   1.594029       4517          1          7 
PR_free~1_sq |      1250       1250    17.5576   273.0843   16.52526   .6392149   1.985554      21947          1         49 
gdp_pc_con~1 |      1250       1250  -.0294862   1.071176   1.034976    2.37585   8.743074   -36.8578   -.654811   5.473057 
gdp_pc_~1_sq |      1250       1250   1.071189   8.570624   2.927563   5.679283   41.47469   1338.986   1.70e-06   29.95435 
   KOFGIlag1 |      1250       1250   55.73612   247.8995   15.74483   .3287793   2.312688   69670.15    23.2923   89.10176 
KOFGIlag1_sq |      1250       1250   3354.216    3447004   1856.611   .7986653   2.745106    4192770   542.5315   7939.124 
population~1 |      1250       1250   .0748045   .9897769   .9948753  -.2366471   1.708895   93.50558     -1.693    1.65901 
      fhbest |      1250       1250      .2416   .1833761   .4282244   1.207327   2.457638        302          0          1 
     fhworst |      1250       1250      .1056   .0945243    .307448   2.566664   7.587765        132          0          1 
deathpenalty |      1250       1250      .6088   .2383532   .4882143  -.4458843   1.198813        761          0          1 

             |     e(p1)      e(p5)     e(p10)     e(p25)     e(p50)     e(p75)     e(p90)     e(p95)     e(p99) 
-------------+---------------------------------------------------------------------------------------------------
urgentActi~s |         0          0          0          0          0          2          6         10         34 
urgentA~lag1 |         0          0          0          0          0          2          6         10         34 
 shamingINGO |         0          0          0          0          0          0          1          2          7 
shamingING~1 |         0          0          0          0          0          0          1          2          7 
RESTRI~mlag1 |         0          0          0          0          1          2          5         10         10 
   PTS_Slag1 |         1          1          1          2          3          3          4          4          5 
hrgroupslag1 |        11         19         25         37         59         88        127        165        240 
  hrnewslag1 |         0          0          0          0          0          0          1          2          5 
protes~glag1 |         0          0          0          0   .6931472   1.609438   2.197225   2.564949   3.178054 
UCDP_armed~1 |         0          0          0          0          0          0          1          1          1 
PR_freedom~1 |         1          1          1          2          3          6          7          7          7 
PR_free~1_sq |         1          1          1          4          9         36         49         49         49 
gdp_pc_con~1 |  -.653102  -.6441492  -.6393695  -.6114114  -.4878383  -.0839899   1.694669   2.118822   4.231508 
gdp_pc_~1_sq |   .000631   .0107492   .0395538    .186043   .3471155   .4104369   2.871903   4.489407   17.90566 
   KOFGIlag1 |  27.47661   32.12257   36.07606   43.58696   54.72352    65.3503   81.00594   84.96984   87.84709 
KOFGIlag1_sq |  754.9639    1031.86   1301.482   1899.823   2994.663   4270.662   6561.963   7219.874   7717.112 
population~1 | -1.626421  -1.507336  -1.360076  -.9060836   .1963325   .9813009   1.278785   1.403454   1.629561 
      fhbest |         0          0          0          0          0          0          1          1          1 
     fhworst |         0          0          0          0          0          0          1          1          1 
deathpenalty |         0          0          0          0          1          1          1          1          1 

. esttab . using ".\Tables\Appendix_TableS2.rtf", cells("mean(fmt(2)) sd min max count") title("Table 1. Summary Statistics") no
> number label replace
(output written to .\Tables\Appendix_TableS2.rtf)

. 
. ** How many countries have 0-5 restrictions, 6-10 restrictions
. capture drop min

. bysort cowcode: egen min = min(RESTRICT_COUNTdomlag1)
(488 missing values generated)

. capture drop max

. bysort cowcode: egen max = max(RESTRICT_COUNTdomlag1)
(488 missing values generated)

. tab COUNTRY if min<=5 & max<=5 & sample==1

                      COUNTRY |      Freq.     Percent        Cum.
------------------------------+-----------------------------------
                  Afghanistan |          5        0.50        0.50
                      Albania |          9        0.89        1.39
                       Angola |          9        0.89        2.28
                    Argentina |          9        0.89        3.17
                      Armenia |          7        0.69        3.86
                      Austria |          9        0.89        4.75
                   Azerbaijan |          7        0.69        5.45
                   Bangladesh |          9        0.89        6.34
                      Belgium |          9        0.89        7.23
                        Benin |          9        0.89        8.12
                      Bolivia |          9        0.89        9.01
           Bosnia-Herzegovina |          7        0.69        9.70
                     Botswana |          9        0.89       10.59
                       Brazil |          9        0.89       11.49
                     Bulgaria |          7        0.69       12.18
   Burkina Faso (Upper Volta) |          9        0.89       13.07
                      Burundi |          9        0.89       13.96
         Cambodia (Kampuchea) |          7        0.69       14.65
                     Cameroon |          9        0.89       15.54
                       Canada |          9        0.89       16.44
                   Cape Verde |          9        0.89       17.33
     Central African Republic |          9        0.89       18.22
                         Chad |          9        0.89       19.11
                        Chile |          9        0.89       20.00
                     Colombia |          9        0.89       20.89
                      Comoros |          9        0.89       21.78
                        Congo |          9        0.89       22.67
                   Costa Rica |          9        0.89       23.56
                      Croatia |          7        0.69       24.26
                       Cyprus |          9        0.89       25.15
               Czech Republic |          5        0.50       25.64
                      Denmark |          9        0.89       26.53
                     Djibouti |          9        0.89       27.43
           Dominican Republic |          9        0.89       28.32
                      Ecuador |          9        0.89       29.21
                  El Salvador |          9        0.89       30.10
                      Estonia |          7        0.69       30.79
                     Ethiopia |          9        0.89       31.68
                      Finland |          9        0.89       32.57
                       France |          9        0.89       33.47
                        Gabon |          9        0.89       34.36
                       Gambia |          9        0.89       35.25
                      Georgia |          7        0.69       35.94
                        Ghana |          9        0.89       36.83
                       Greece |          9        0.89       37.72
                    Guatemala |          9        0.89       38.61
                       Guinea |          7        0.69       39.31
                Guinea-Bissau |          9        0.89       40.20
                       Guyana |          9        0.89       41.09
                        Haiti |          9        0.89       41.98
                     Honduras |          9        0.89       42.87
                      Hungary |          9        0.89       43.76
                      Ireland |          9        0.89       44.65
                        Italy |          9        0.89       45.54
                  Ivory Coast |          9        0.89       46.44
                      Jamaica |          9        0.89       47.33
                        Japan |          9        0.89       48.22
                       Jordan |          9        0.89       49.11
                   Kazakhstan |          7        0.69       49.80
                        Kenya |          9        0.89       50.69
           Korea, Republic of |          9        0.89       51.58
                       Kuwait |          9        0.89       52.48
              Kyrgyz Republic |          7        0.69       53.17
                       Latvia |          7        0.69       53.86
                      Lebanon |          9        0.89       54.75
                      Lesotho |          9        0.89       55.64
                      Liberia |          9        0.89       56.53
                    Lithuania |          7        0.69       57.23
                   Luxembourg |          7        0.69       57.92
                    Macedonia |          5        0.50       58.42
        Madagascar (Malagasy) |          9        0.89       59.31
                       Malawi |          9        0.89       60.20
                     Malaysia |          9        0.89       61.09
                         Mali |          9        0.89       61.98
                   Mauritania |          9        0.89       62.87
                    Mauritius |          9        0.89       63.76
                       Mexico |          9        0.89       64.65
                      Moldova |          7        0.69       65.35
                     Mongolia |          9        0.89       66.24
                      Morocco |          9        0.89       67.13
                   Mozambique |          9        0.89       68.02
                      Namibia |          9        0.89       68.91
                        Nepal |          9        0.89       69.80
                  Netherlands |          9        0.89       70.69
                    Nicaragua |          9        0.89       71.58
                        Niger |          9        0.89       72.48
                      Nigeria |          9        0.89       73.37
                       Norway |          9        0.89       74.26
                     Pakistan |          9        0.89       75.15
                       Panama |          9        0.89       76.04
             Papua New Guinea |          9        0.89       76.93
                     Paraguay |          9        0.89       77.82
                         Peru |          9        0.89       78.71
                  Philippines |          9        0.89       79.60
                       Poland |          9        0.89       80.50
                     Portugal |          9        0.89       81.39
                      Rumania |          9        0.89       82.28
                      Senegal |          9        0.89       83.17
                 Sierra Leone |          9        0.89       84.06
                     Slovakia |          5        0.50       84.55
                     Slovenia |          7        0.69       85.25
                 South Africa |          9        0.89       86.14
                        Spain |          9        0.89       87.03
           Sri Lanka (Ceylon) |          9        0.89       87.92
                      Surinam |          9        0.89       88.81
                    Swaziland |          9        0.89       89.70
                       Sweden |          9        0.89       90.59
                  Switzerland |          9        0.89       91.49
                   Tajikistan |          7        0.69       92.18
          Tanzania/Tanganyika |          9        0.89       93.07
                     Thailand |          9        0.89       93.96
                         Togo |          9        0.89       94.85
                       Uganda |          9        0.89       95.74
                      Ukraine |          7        0.69       96.44
               United Kingdom |          9        0.89       97.33
                      Uruguay |          9        0.89       98.22
                    Venezuela |          9        0.89       99.11
                       Zambia |          9        0.89      100.00
------------------------------+-----------------------------------
                        Total |      1,010      100.00

. codebook COUNTRY if min<=5 & max<=5 & sample==1

--------------------------------------------------------------------------------------------------------------------------------
COUNTRY                                                                                                                  COUNTRY
--------------------------------------------------------------------------------------------------------------------------------

                  type:  string (str29), but longest is str26

         unique values:  118                      missing "":  0/1,010

              examples:  "Chile"
                         "Guinea-Bissau"
                         "Malawi"
                         "Poland"

               warning:  variable has embedded blanks

. tab COUNTRY if max>5 & max!=. & sample==1

                      COUNTRY |      Freq.     Percent        Cum.
------------------------------+-----------------------------------
                      Algeria |          9        3.75        3.75
                      Bahrain |          9        3.75        7.50
                      Belarus |          5        2.08        9.58
                       Bhutan |          9        3.75       13.33
                        China |          9        3.75       17.08
Congo, Democratic Republic of |          7        2.92       20.00
                         Cuba |          9        3.75       23.75
                        Egypt |          9        3.75       27.50
            Equatorial Guinea |          7        2.92       30.42
                      Eritrea |          5        2.08       32.50
                        India |          9        3.75       36.25
                    Indonesia |          9        3.75       40.00
                Iran (Persia) |          7        2.92       42.92
                         Iraq |          9        3.75       46.67
                         Laos |          9        3.75       50.42
                        Libya |          8        3.33       53.75
              Myanmar (Burma) |          9        3.75       57.50
                         Oman |          9        3.75       61.25
                        Qatar |          7        2.92       64.17
                       Rwanda |          9        3.75       67.92
                 Saudi Arabia |          9        3.75       71.67
                    Singapore |          9        3.75       75.42
                        Sudan |          9        3.75       79.17
                      Tunisia |          9        3.75       82.92
                       Turkey |          9        3.75       86.67
                 Turkmenistan |          7        2.92       89.58
         United Arab Emirates |          9        3.75       93.33
                   Uzbekistan |          7        2.92       96.25
                     Zimbabwe |          9        3.75      100.00
------------------------------+-----------------------------------
                        Total |        240      100.00

. codebook COUNTRY if max>5 & max!=.& sample==1

--------------------------------------------------------------------------------------------------------------------------------
COUNTRY                                                                                                                  COUNTRY
--------------------------------------------------------------------------------------------------------------------------------

                  type:  string (str29)

         unique values:  29                       missing "":  0/240

              examples:  "Congo, Democratic Republic of"
                         "Indonesia"
                         "Oman"
                         "Tunisia"

               warning:  variable has embedded blanks

. capture drop min max

. 
. 
. ** Loess curve plot
. #delimit ;
delimiter now ;
. twoway lowess urgentActions RESTRICT_COUNTdomlag1 if sample==1 ,
> color("gray") lwidth(1.2) ||
> scatter urgentActions RESTRICT_COUNTdomlag1 if sample==1 & urgentActions<=60,
> scheme(s1mono) msize(0.75) mcolor(gs0)
> xscale(range(0 10))  xlabel(0(1)10) 
> yscale(range(0 60)) ylabel(0 (20) 60)
> xtitle("Number of restriction types", size(large)) 
> ytitle("Number of UAs", size(large)) legend(off);

. #delimit cr
delimiter now cr
. graph export ".\Figures\Manuscript_Figure2.png", replace
(file .\Figures\Manuscript_Figure2.png written in PNG format)

. 
. 
. ** Appendix 3: Figure S2 (Egypt plots)
. #delimit ;
delimiter now ;
. twoway line RESTRICT_COUNTdomlag1 YEAR if YEAR>=1998 & YEAR<=2007 & COUNTRY=="Egypt" ,
> color("red") lwidth(1.2)
> scheme(s1mono) msize(0.75) mcolor(gs0)
> yscale(range(0 10)) ylabel(0 (1) 10)
> xscale(range(1998 2007)) xlabel(1998 (1) 2007)
> xtitle("Time in years", size(large)) 
> ytitle("Number of restriction types", size(large)) legend(off);

. #delimit cr
delimiter now cr
. graph export ".\Figures\Appendix_FigureS3b_1.png", replace
(file .\Figures\Appendix_FigureS3b_1.png written in PNG format)

. 
. #delimit ;
delimiter now ;
. twoway line urgentActions YEAR if YEAR>=1998 & YEAR<=2007 & COUNTRY=="Egypt" ,
> color("blue") lwidth(1.2)
> scheme(s1mono) msize(0.75) mcolor(gs0)
> xscale(range(1998 2007)) xlabel(1998 (1) 2007)
> yscale(range(0 40)) ylabel(0 (4) 40)
> xtitle("Time in years", size(large)) 
> ytitle("Number of UAs", size(large)) legend(off);

. #delimit cr
delimiter now cr
. graph export ".\Figures\Appendix_FigureS3b_2.png", replace
(file .\Figures\Appendix_FigureS3b_2.png written in PNG format)

. 
. 
. 
. *************************************************************
. * Model 3: Zero inflated negative binomial 
. *************************************************************
. set seed 1234

. #delimit ;
delimiter now ;
. zinb urgentActions c.RESTRICT_COUNTdomlag1##c.RESTRICT_COUNTdomlag1
> PTS_Slag1 hrgroupslag1 hrnewslag1 
> protest_ClarkRegan_loglag1 UCDP_armedConflictlag1 
> PR_freedomHouselag1 PR_freedomHouselag1_sq 
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1, 
> inflate(fhbest fhworst UCDP_armedConflictlag1 deathpenalty urgentActionslag1) 
> vce(cluster cowcode);

Fitting constant-only model:

Iteration 0:   log pseudolikelihood = -2328.2805  
Iteration 1:   log pseudolikelihood = -2168.6869  
Iteration 2:   log pseudolikelihood = -2016.6097  
Iteration 3:   log pseudolikelihood = -1971.0267  
Iteration 4:   log pseudolikelihood = -1948.4438  
Iteration 5:   log pseudolikelihood = -1944.1592  
Iteration 6:   log pseudolikelihood = -1943.8511  
Iteration 7:   log pseudolikelihood = -1943.8495  
Iteration 8:   log pseudolikelihood = -1943.8495  

Fitting full model:

Iteration 0:   log pseudolikelihood = -1943.8495  
Iteration 1:   log pseudolikelihood = -1814.5028  
Iteration 2:   log pseudolikelihood = -1771.9786  
Iteration 3:   log pseudolikelihood = -1767.3962  
Iteration 4:   log pseudolikelihood = -1767.3389  
Iteration 5:   log pseudolikelihood = -1767.3388  

Zero-inflated negative binomial regression      Number of obs     =      1,250
                                                Nonzero obs       =        537
                                                Zero obs          =        713

Inflation model      = logit                    Wald chi2(14)     =     255.75
Log pseudolikelihood = -1767.339                Prob > chi2       =     0.0000

                                                                 (Std. Err. adjusted for 147 clusters in cowcode)
-----------------------------------------------------------------------------------------------------------------
                                                |               Robust
                                  urgentActions |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
------------------------------------------------+----------------------------------------------------------------
urgentActions                                   |
                          RESTRICT_COUNTdomlag1 |   .4159244   .0901508     4.61   0.000      .239232    .5926167
                                                |
c.RESTRICT_COUNTdomlag1#c.RESTRICT_COUNTdomlag1 |  -.0338658   .0095778    -3.54   0.000    -.0526379   -.0150937
                                                |
                                      PTS_Slag1 |   .4680657   .0893296     5.24   0.000     .2929828    .6431485
                                   hrgroupslag1 |   .0006071   .0024316     0.25   0.803    -.0041588    .0053731
                                     hrnewslag1 |   .1186674   .0335614     3.54   0.000     .0528882    .1844466
                     protest_ClarkRegan_loglag1 |   .3162384   .0751335     4.21   0.000     .1689796    .4634973
                         UCDP_armedConflictlag1 |   .2289934    .235184     0.97   0.330    -.2319588    .6899457
                            PR_freedomHouselag1 |   .3589936   .2755317     1.30   0.193    -.1810387    .8990259
                         PR_freedomHouselag1_sq |  -.0403888   .0317652    -1.27   0.204    -.1026475    .0218698
                      gdp_pc_constantUS2010lag1 |   .6674244   .3279905     2.03   0.042     .0245748    1.310274
                   gdp_pc_constantUS2010lag1_sq |  -.2533277   .1268366    -2.00   0.046     -.501923   -.0047325
                                      KOFGIlag1 |   .0828144   .0398538     2.08   0.038     .0047025    .1609264
                                   KOFGIlag1_sq |  -.0007453   .0003771    -1.98   0.048    -.0014845   -6.07e-06
                                 populationlag1 |   .0648742   .1743461     0.37   0.710    -.2768379    .4065864
                                          _cons |  -3.971119   1.161067    -3.42   0.001    -6.246769    -1.69547
------------------------------------------------+----------------------------------------------------------------
inflate                                         |
                                         fhbest |   .5998682   .5150758     1.16   0.244    -.4096619    1.609398
                                        fhworst |  -1.794393   1.037315    -1.73   0.084    -3.827492    .2387069
                         UCDP_armedConflictlag1 |  -.7883487   .4252457    -1.85   0.064    -1.621815    .0451175
                                   deathpenalty |   .1366855   .3137388     0.44   0.663    -.4782313    .7516022
                              urgentActionslag1 |  -1.212945    .227869    -5.32   0.000     -1.65956   -.7663298
                                          _cons |   .3017435   .2621419     1.15   0.250    -.2120452    .8155322
------------------------------------------------+----------------------------------------------------------------
                                       /lnalpha |  -.1374687   .1448808    -0.95   0.343    -.4214298    .1464924
------------------------------------------------+----------------------------------------------------------------
                                          alpha |   .8715617   .1262725                      .6561081    1.157766
-----------------------------------------------------------------------------------------------------------------

.  // vuong ;
> #delimit cr
delimiter now cr
. predict yhat, n
(1,632 missing values generated)

. 
. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |      1,250  -1943.85  -1767.339      22    3578.678   3691.557
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. mat es_ic = r(S)

. local AIC: display %4.1f es_ic[1,5]

. local BIC: display %4.1f es_ic[1,6]

. local LL: display %4.1f es_ic[1,3]

. outreg2 using ".\Tables\Manuscript_Table1.doc", append ///
> ctitle("Model 3") label  eqdrop(lnalpha) dec(3) ///
> alpha(0.001, 0.01, 0.05, 0.1) symbol(***,**, *, +) ///
> addtext(Log-Likelihood, `LL', BIC, `BIC', AIC, `AIC')
.\Tables\Manuscript_Table1.doc
dir : seeout

. 
. margins, at(RESTRICT_COUNTdomlag1 = (0 7)) contrast(atcontrast(r)) //    2.80838   .7413316      1.588998    4.027762

Contrasts of predictive margins
Model VCE    : Robust

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           0

2._at        : RESTRI~mlag1    =           7

------------------------------------------------
             |         df        chi2     P>chi2
-------------+----------------------------------
         _at |          1       14.35     0.0002
------------------------------------------------

--------------------------------------------------------------
             |            Delta-method
             |   Contrast   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
         _at |
   (2 vs 1)  |    2.80838   .7413316      1.355396    4.261363
--------------------------------------------------------------

. margins, at(RESTRICT_COUNTdomlag1 = (7 10)) contrast(atcontrast(r)) // -1.497769   .6840491      -2.62293   -.3726088

Contrasts of predictive margins
Model VCE    : Robust

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           7

2._at        : RESTRI~mlag1    =          10

------------------------------------------------
             |         df        chi2     P>chi2
-------------+----------------------------------
         _at |          1        4.79     0.0286
------------------------------------------------

--------------------------------------------------------------
             |            Delta-method
             |   Contrast   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
         _at |
   (2 vs 1)  |  -1.497769   .6840491     -2.838481   -.1570578
--------------------------------------------------------------

. 
. margins, at(RESTRICT_COUNTdomlag1 = (0(1)10) ) post

Predictive margins                              Number of obs     =      1,250
Model VCE    : Robust

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           0

2._at        : RESTRI~mlag1    =           1

3._at        : RESTRI~mlag1    =           2

4._at        : RESTRI~mlag1    =           3

5._at        : RESTRI~mlag1    =           4

6._at        : RESTRI~mlag1    =           5

7._at        : RESTRI~mlag1    =           6

8._at        : RESTRI~mlag1    =           7

9._at        : RESTRI~mlag1    =           8

10._at       : RESTRI~mlag1    =           9

11._at       : RESTRI~mlag1    =          10

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |    1.12448   .1496947     7.51   0.000     .8310838    1.417876
          2  |   1.647698    .175132     9.41   0.000     1.304446    1.990951
          3  |   2.256255   .2753466     8.19   0.000     1.716585    2.795924
          4  |   2.887242   .4281372     6.74   0.000     2.048108    3.726375
          5  |    3.45273   .5804863     5.95   0.000     2.314998    4.590462
          6  |   3.858573   .6859879     5.62   0.000     2.514061    5.203084
          7  |   4.029724    .721945     5.58   0.000     2.614738     5.44471
          8  |    3.93286    .703763     5.59   0.000     2.553509     5.31221
          9  |   3.586957   .6793302     5.28   0.000     2.255494    4.918419
         10  |   3.057231   .6858508     4.46   0.000     1.712989    4.401474
         11  |    2.43509   .7069691     3.44   0.001     1.049456    3.820724
------------------------------------------------------------------------------

. display _b[8._at] - _b[11._at]          
1.4977694

. display _b[8._at] - _b[1._at]           
2.8083795

. test _b[8._at] = _b[11._at] 

 ( 1)  8._at - 11._at = 0

           chi2(  1) =    4.79
         Prob > chi2 =    0.0286

. marginsplot, recast(line) recastci(rarea)  ///
> yscale(range(0 10)) ylabel(0(2)10) ///
> plotopt(color(gs0) lwidth(1) ) ///
> ciopt(color(gs6) fintensity(10) lcolor(gs16) ) ///
> xtitle("Count of restriction types", size(large)) ///
> ytitle("Predicted number of UAs", size(large)) ///
> title("Model 3", size(large)) ///
> scheme(s1mono)

  Variables that uniquely identify margins: RESTRICT_COUNTdomlag1

. graph export ".\Figures\Manuscript_Figure3b.png", replace
(file .\Figures\Manuscript_Figure3b.png written in PNG format)

. 
. ** Plot: Predicted vs actual UAs
. capture drop diag*

. gen diag = 0 in 1
(2,881 missing values generated)

. replace diag = 30 in 2
(1 real change made)

. gen diag2 = diag
(2,880 missing values generated)

. #delimit ;
delimiter now ;
. twoway scatter yhat urgentActions if urgentActions<=20 || 
> scatter yhat urgentActions if COUNTRY=="Egypt", mcolor("blue") ||
> line diag diag2,
> yscale(range(0 30)) ylabel(0(5)30)
> xscale(range(0 30)) xlabel(0(5)30)
> lwidth(1) lcolor(gs02)
> xtitle("Observed number of UAs", size(large)) 
> ytitle("Predicted number of UAs", size(large)) 
> legend(off)
> scheme(s1mono) ;
(note:  named style gs02 not found in class color, default attributes used)
(note:  named style gs02 not found in class color, default attributes used)

. #delimit cr
delimiter now cr
. graph export ".\Figures\Appendix_FigureS3a.png", replace
(file .\Figures\Appendix_FigureS3a.png written in PNG format)

. 
. 
. 
. 
. ******************************************************************************
. ** Model 4: GMM: Instrumental Variable Poisson with bootstrapped standard errors; only two instrumented variables
. ******************************************************************************
. 
. ** Some tests: 
. *Poisson with bootstrapped SE (to compare to GMM-estimated model parameter estimates)
. xtset, clear

. capture drop vhat*

. #delimit ;
delimiter now ;
. poisson urgentActions c.RESTRICT_COUNTdomlag1##c.RESTRICT_COUNTdomlag1
> PTS_Slag1 hrgroupslag1 hrnewslag1 
> protest_ClarkRegan_loglag1 UCDP_armedConflictlag1 
> PR_freedomHouselag1 PR_freedomHouselag1_sq 
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1, vce(boot, reps(20) cl(cowcode));
(running poisson on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Poisson regression                              Number of obs     =      1,250
                                                Replications      =         20
                                                Wald chi2(14)     =    1563.16
                                                Prob > chi2       =     0.0000
Log likelihood = -2884.4002                     Pseudo R2         =     0.4213

                                                                  (Replications based on 147 clusters in cowcode)
-----------------------------------------------------------------------------------------------------------------
                                                |   Observed   Bootstrap                         Normal-based
                                  urgentActions |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
------------------------------------------------+----------------------------------------------------------------
                          RESTRICT_COUNTdomlag1 |   .4133792   .0896981     4.61   0.000      .237574    .5891843
                                                |
c.RESTRICT_COUNTdomlag1#c.RESTRICT_COUNTdomlag1 |  -.0305905   .0105945    -2.89   0.004    -.0513554   -.0098256
                                                |
                                      PTS_Slag1 |   .5031188   .0824057     6.11   0.000     .3416066     .664631
                                   hrgroupslag1 |   .0002265   .0034055     0.07   0.947    -.0064482    .0069013
                                     hrnewslag1 |   .1239772   .0369258     3.36   0.001     .0516039    .1963505
                     protest_ClarkRegan_loglag1 |   .2939316   .0778884     3.77   0.000     .1412731    .4465901
                         UCDP_armedConflictlag1 |   .4119283    .180421     2.28   0.022     .0583097     .765547
                            PR_freedomHouselag1 |   .5951987   .2330467     2.55   0.011     .1384355    1.051962
                         PR_freedomHouselag1_sq |  -.0690081   .0290928    -2.37   0.018    -.1260291   -.0119872
                      gdp_pc_constantUS2010lag1 |   .9227314   .5716311     1.61   0.106     -.197645    2.043108
                   gdp_pc_constantUS2010lag1_sq |  -.4245096   .3037234    -1.40   0.162    -1.019796    .1707773
                                      KOFGIlag1 |   .0897003   .0445022     2.02   0.044     .0024776     .176923
                                   KOFGIlag1_sq |  -.0008879   .0004805    -1.85   0.065    -.0018297     .000054
                                 populationlag1 |  -.0260019   .2115103    -0.12   0.902    -.4405545    .3885508
                                          _cons |  -4.620384   1.438816    -3.21   0.001    -7.440412   -1.800355
-----------------------------------------------------------------------------------------------------------------

. #delimit cr
delimiter now cr
. * Endogeneity
. #delimit ;
delimiter now ;
. reg RESTRICT_COUNTdomlag1 gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 RESTRICT_COUNTdomlag2 RESTRICT_COUNTdomlag3, vce(boot, reps(20) cl(cowcode)) ;
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      1,778
                                                Replications      =         20
                                                Wald chi2(7)      =    2253.65
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.6408
                                                Adj R-squared     =     0.6394
                                                Root MSE          =     1.5728

                                               (Replications based on 164 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
       RESTRICT_COUNTdomlag1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
   gdp_pc_constantUS2010lag1 |   .2463196   .1817235     1.36   0.175     -.109852    .6024912
gdp_pc_constantUS2010lag1_sq |  -.0332097    .051039    -0.65   0.515    -.1332444     .066825
                   KOFGIlag1 |    .011456   .0165086     0.69   0.488    -.0209002    .0438123
                KOFGIlag1_sq |  -.0003353   .0001511    -2.22   0.027    -.0006316   -.0000391
              populationlag1 |  -.1394559   .0802913    -1.74   0.082     -.296824    .0179121
       RESTRICT_COUNTdomlag2 |   .6642655   .0656176    10.12   0.000     .5356573    .7928736
       RESTRICT_COUNTdomlag3 |   .1641477   .0783049     2.10   0.036      .010673    .3176224
                       _cons |   .8740714   .5336184     1.64   0.101    -.1718015    1.919944
----------------------------------------------------------------------------------------------

. predict vhat1, resid ;
(1,104 missing values generated)

. reg RESTRICT_COUNTdomlag1_sq gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 RESTRICT_COUNTdomlag2_sq RESTRICT_COUNTdomlag3_sq, vce(boot, reps(20) cl(cowcode)) ;
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      1,778
                                                Replications      =         20
                                                Wald chi2(7)      =     824.68
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.6152
                                                Adj R-squared     =     0.6137
                                                Root MSE          =    14.9598

                                               (Replications based on 164 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
    RESTRICT_COUNTdomlag1_sq |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
   gdp_pc_constantUS2010lag1 |   2.749623   2.370892     1.16   0.246    -1.897241    7.396486
gdp_pc_constantUS2010lag1_sq |  -.4086929   .5982771    -0.68   0.495    -1.581295    .7639088
                   KOFGIlag1 |   .0413554   .2559283     0.16   0.872    -.4602549    .5429658
                KOFGIlag1_sq |  -.0025526   .0025256    -1.01   0.312    -.0075026    .0023974
              populationlag1 |  -1.482737    .624451    -2.37   0.018    -2.706639   -.2588361
    RESTRICT_COUNTdomlag2_sq |    .672295   .0739276     9.09   0.000     .5273996    .8171904
    RESTRICT_COUNTdomlag3_sq |   .1396389   .0860931     1.62   0.105    -.0291004    .3083782
                       _cons |   9.017048   6.143909     1.47   0.142    -3.024793    21.05889
----------------------------------------------------------------------------------------------

. predict vhat2, resid ;
(1,104 missing values generated)

. poisson urgentActions RESTRICT_COUNTdomlag1 RESTRICT_COUNTdomlag1_sq
> PTS_Slag1 hrgroupslag1 hrnewslag1 
> protest_ClarkRegan_loglag1 UCDP_armedConflictlag1 
> PR_freedomHouselag1 PR_freedomHouselag1_sq 
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 vhat1 vhat2, vce(boot, reps(20) cl(cowcode)) ;
(running poisson on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Poisson regression                              Number of obs     =      1,248
                                                Replications      =         20
                                                Wald chi2(16)     =   12683.59
                                                Prob > chi2       =     0.0000
Log likelihood = -2828.7683                     Pseudo R2         =     0.4312

                                               (Replications based on 147 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
               urgentActions |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
       RESTRICT_COUNTdomlag1 |   .6089678   .1181007     5.16   0.000     .3774946     .840441
    RESTRICT_COUNTdomlag1_sq |  -.0512041   .0135393    -3.78   0.000    -.0777407   -.0246675
                   PTS_Slag1 |   .5008431   .0911595     5.49   0.000     .3221738    .6795124
                hrgroupslag1 |   -.000628   .0033861    -0.19   0.853    -.0072646    .0060087
                  hrnewslag1 |   .1150803   .0280214     4.11   0.000     .0601593    .1700012
  protest_ClarkRegan_loglag1 |   .3169152   .0746493     4.25   0.000     .1706052    .4632252
      UCDP_armedConflictlag1 |   .3766728   .2669661     1.41   0.158    -.1465712    .8999169
         PR_freedomHouselag1 |   .4843967   .2691983     1.80   0.072    -.0432223    1.012016
      PR_freedomHouselag1_sq |    -.05638    .035348    -1.59   0.111    -.1256608    .0129007
   gdp_pc_constantUS2010lag1 |   .9889666   .4900904     2.02   0.044      .028407    1.949526
gdp_pc_constantUS2010lag1_sq |  -.4451232    .224477    -1.98   0.047    -.8850901   -.0051563
                   KOFGIlag1 |   .0848994   .0773814     1.10   0.273    -.0667653    .2365642
                KOFGIlag1_sq |  -.0008448     .00072    -1.17   0.241    -.0022559    .0005663
              populationlag1 |  -.0111496   .1906654    -0.06   0.953    -.3848469    .3625477
                       vhat1 |  -.4515249   .2064172    -2.19   0.029    -.8560952   -.0469546
                       vhat2 |   .0466912   .0177911     2.62   0.009     .0118213    .0815611
                       _cons |  -4.396934   1.977968    -2.22   0.026     -8.27368   -.5201892
----------------------------------------------------------------------------------------------

. test vhat1 vhat2 ;

 ( 1)  [urgentActions]vhat1 = 0
 ( 2)  [urgentActions]vhat2 = 0

           chi2(  2) =   10.65
         Prob > chi2 =    0.0049

. #delimit cr
delimiter now cr
. * Test of instruments
. * Restrictions
. #delimit ;
delimiter now ;
. reg RESTRICT_COUNTdomlag1 RESTRICT_COUNTdomlag2 RESTRICT_COUNTdomlag3
> PTS_Slag1 hrgroupslag1 hrnewslag1 
> protest_ClarkRegan_loglag1 UCDP_armedConflictlag1 
> PR_freedomHouselag1 PR_freedomHouselag1_sq 
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1, vce(boot, reps(50) cl(cowcode));
(running regress on estimation sample)

Bootstrap replications (50)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50

Linear regression                               Number of obs     =      1,248
                                                Replications      =         50
                                                Wald chi2(14)     =    4890.19
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.7082
                                                Adj R-squared     =     0.7048
                                                Root MSE          =     1.4711

                                               (Replications based on 147 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
       RESTRICT_COUNTdomlag1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
       RESTRICT_COUNTdomlag2 |   .6465373    .040836    15.83   0.000     .5665001    .7265744
       RESTRICT_COUNTdomlag3 |   .0451786   .0527736     0.86   0.392    -.0582557    .1486129
                   PTS_Slag1 |   .1120206   .0697549     1.61   0.108    -.0246965    .2487378
                hrgroupslag1 |  -.0001783   .0012041    -0.15   0.882    -.0025383    .0021818
                  hrnewslag1 |   .0255864   .0429115     0.60   0.551    -.0585185    .1096913
  protest_ClarkRegan_loglag1 |  -.0669369   .0487178    -1.37   0.169     -.162422    .0285482
      UCDP_armedConflictlag1 |   .0503302   .1646197     0.31   0.760    -.2723186     .372979
         PR_freedomHouselag1 |  -.2436162   .1520131    -1.60   0.109    -.5415565    .0543241
      PR_freedomHouselag1_sq |   .0639798   .0203598     3.14   0.002     .0240753    .1038842
   gdp_pc_constantUS2010lag1 |   .3780922   .1698564     2.23   0.026     .0451797    .7110047
gdp_pc_constantUS2010lag1_sq |  -.0643946   .0538197    -1.20   0.232    -.1698794    .0410901
                   KOFGIlag1 |   .0384947   .0274899     1.40   0.161    -.0153845     .092374
                KOFGIlag1_sq |  -.0005105   .0002662    -1.92   0.055    -.0010322    .0000112
              populationlag1 |  -.2075168   .0732717    -2.83   0.005    -.3511266    -.063907
                       _cons |  -.1836095   .8227061    -0.22   0.823    -1.796084    1.428865
----------------------------------------------------------------------------------------------

. #delimit cr
delimiter now cr
. test RESTRICT_COUNTdomlag2 RESTRICT_COUNTdomlag3

 ( 1)  RESTRICT_COUNTdomlag2 = 0
 ( 2)  RESTRICT_COUNTdomlag3 = 0

           chi2(  2) =  329.56
         Prob > chi2 =    0.0000

. * Restriction sq.
. #delimit ;
delimiter now ;
. reg RESTRICT_COUNTdomlag1_sq RESTRICT_COUNTdomlag2_sq RESTRICT_COUNTdomlag3_sq
> PTS_Slag1 hrgroupslag1 hrnewslag1 
> protest_ClarkRegan_loglag1 UCDP_armedConflictlag1 
> PR_freedomHouselag1 PR_freedomHouselag1_sq 
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1, vce(boot, reps(50) cl(cowcode));
(running regress on estimation sample)

Bootstrap replications (50)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50

Linear regression                               Number of obs     =      1,248
                                                Replications      =         50
                                                Wald chi2(14)     =    1207.50
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.6970
                                                Adj R-squared     =     0.6936
                                                Root MSE          =    13.8738

                                               (Replications based on 147 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
    RESTRICT_COUNTdomlag1_sq |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
    RESTRICT_COUNTdomlag2_sq |   .6871634   .0460824    14.91   0.000     .5968436    .7774833
    RESTRICT_COUNTdomlag3_sq |   .0204453   .0565726     0.36   0.718    -.0904351    .1313256
                   PTS_Slag1 |   .4903891   .6555227     0.75   0.454    -.7944117     1.77519
                hrgroupslag1 |  -.0013164   .0096276    -0.14   0.891    -.0201861    .0175534
                  hrnewslag1 |    .248149   .3835679     0.65   0.518    -.5036303    .9999284
  protest_ClarkRegan_loglag1 |  -.9341431   .3922518    -2.38   0.017    -1.702943   -.1653437
      UCDP_armedConflictlag1 |  -1.413826   1.966809    -0.72   0.472      -5.2687    2.441048
         PR_freedomHouselag1 |  -4.101963   1.333864    -3.08   0.002    -6.716289   -1.487637
      PR_freedomHouselag1_sq |   .7785856   .1910534     4.08   0.000     .4041278    1.153043
   gdp_pc_constantUS2010lag1 |   3.366563   2.169093     1.55   0.121    -.8847819    7.617908
gdp_pc_constantUS2010lag1_sq |  -.5884659   .5723995    -1.03   0.304    -1.710348    .5334166
                   KOFGIlag1 |   .3125363   .2358131     1.33   0.185    -.1496489    .7747216
                KOFGIlag1_sq |  -.0044644   .0023823    -1.87   0.061    -.0091336    .0002047
              populationlag1 |  -1.787299   .8643323    -2.07   0.039    -3.481359   -.0932391
                       _cons |   3.059488   5.883126     0.52   0.603    -8.471228     14.5902
----------------------------------------------------------------------------------------------

. #delimit cr
delimiter now cr
. test RESTRICT_COUNTdomlag2_sq RESTRICT_COUNTdomlag3_sq

 ( 1)  RESTRICT_COUNTdomlag2_sq = 0
 ( 2)  RESTRICT_COUNTdomlag3_sq = 0

           chi2(  2) =  250.97
         Prob > chi2 =    0.0000

. 
. 
. ** GMM (with 2 EEVs)
. xtset, clear

. set seed 2

. #delimit ;
delimiter now ;
. ivpoisson gmm urgentActions
> PTS_Slag1 hrgroupslag1 hrnewslag1 
> protest_ClarkRegan_loglag1 UCDP_armedConflictlag1 
> PR_freedomHouselag1 PR_freedomHouselag1_sq 
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1
> ( RESTRICT_COUNTdomlag1 RESTRICT_COUNTdomlag1_sq = 
>         RESTRICT_COUNTdomlag2 RESTRICT_COUNTdomlag3
>         RESTRICT_COUNTdomlag2_sq)
>         , twostep vce(boot, reps(50) cl(cowcode) seed(1)) ;
(running ivpoisson on estimation sample)

Bootstrap replications (50)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50

Exponential mean model with endogenous regressors

Number of parameters =  15                         Number of obs  =      1,248
Number of moments    =  16
Initial weight matrix: Unadjusted
GMM weight matrix:     Robust

                                               (Replications based on 147 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
               urgentActions |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
       RESTRICT_COUNTdomlag1 |   .6679634    .168589     3.96   0.000     .3375351    .9983917
    RESTRICT_COUNTdomlag1_sq |  -.0549096   .0169508    -3.24   0.001    -.0881325   -.0216867
                   PTS_Slag1 |   .5001808   .1163427     4.30   0.000     .2721534    .7282083
                hrgroupslag1 |  -.0008677   .0036218    -0.24   0.811    -.0079663    .0062308
                  hrnewslag1 |   .1208408   .0305175     3.96   0.000     .0610276     .180654
  protest_ClarkRegan_loglag1 |     .29215   .1006123     2.90   0.004     .0949536    .4893465
      UCDP_armedConflictlag1 |   .2685283   .2783325     0.96   0.335    -.2769933      .81405
         PR_freedomHouselag1 |    .378531   .2779511     1.36   0.173    -.1662432    .9233052
      PR_freedomHouselag1_sq |  -.0470885   .0320156    -1.47   0.141    -.1098379    .0156608
   gdp_pc_constantUS2010lag1 |   .9764641   .5170642     1.89   0.059    -.0369631    1.989891
gdp_pc_constantUS2010lag1_sq |  -.4470132    .343939    -1.30   0.194    -1.121121    .2270948
                   KOFGIlag1 |   .0811365   .0530779     1.53   0.126    -.0228943    .1851674
                KOFGIlag1_sq |  -.0008054     .00052    -1.55   0.121    -.0018245    .0002137
              populationlag1 |  -.0023642   .1782872    -0.01   0.989    -.3518007    .3470723
                       _cons |  -4.187814   1.444941    -2.90   0.004    -7.019847   -1.355782
----------------------------------------------------------------------------------------------
Instrumented:  RESTRICT_COUNTdomlag1 RESTRICT_COUNTdomlag1_sq
Instruments:   PTS_Slag1 hrgroupslag1 hrnewslag1 protest_ClarkRegan_loglag1
               UCDP_armedConflictlag1 PR_freedomHouselag1 PR_freedomHouselag1_sq
               gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq KOFGIlag1 KOFGIlag1_sq
               populationlag1 RESTRICT_COUNTdomlag2 RESTRICT_COUNTdomlag3
               RESTRICT_COUNTdomlag2_sq

. #delimit cr
delimiter now cr
. estat overid

  Test of overidentifying restriction:

  Hansen's J chi2(1) = .030846 (p = 0.8606)

. 
. mat es_ic = r(J) 

. matrix list es_ic

symmetric es_ic[1,1]
           c1
r1  .03084616

. local J: display %4.1f es_ic[1,1]

. outreg2 using ".\Tables\Manuscript_Table1.doc", append ///
>  ctitle("Model 4") label  eqdrop(lnalpha) dec(3) ///
> alpha(0.001, 0.01, 0.05, 0.1) symbol(***,**, *, +) ///
> addtext(Hansen's J, `J')
.\Tables\Manuscript_Table1.doc
dir : seeout

. 
. set level 95

. margins, at(RESTRICT_COUNTdomlag1 = (0 6) RESTRICT_COUNTdomlag1_sq = (0 36)) contrast(atcontrast(r)) //      4.869633   1.7983
> 45      1.344942    8.394325

Contrasts of predictive margins
Model VCE    : Bootstrap

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           0
               RESTRIC~1_sq    =           0

2._at        : RESTRI~mlag1    =           0
               RESTRIC~1_sq    =          36

3._at        : RESTRI~mlag1    =           6
               RESTRIC~1_sq    =           0

4._at        : RESTRI~mlag1    =           6
               RESTRIC~1_sq    =          36

------------------------------------------------
             |         df        chi2     P>chi2
-------------+----------------------------------
         _at |
   (2 vs 1)  |          1       22.70     0.0000
   (3 vs 1)  |          1        1.38     0.2404
   (4 vs 1)  |          1        7.07     0.0079
      Joint  |          3       84.54     0.0000
------------------------------------------------

--------------------------------------------------------------
             |            Delta-method
             |   Contrast   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
         _at |
   (2 vs 1)  |  -.6256166   .1313003     -.8829605   -.3682727
   (3 vs 1)  |   39.23326   33.41871     -26.26621    104.7327
   (4 vs 1)  |   4.808953   1.809208       1.26297    8.354936
--------------------------------------------------------------

. margins, at(RESTRICT_COUNTdomlag1 = (6 10) RESTRICT_COUNTdomlag1_sq = (36 100)) contrast(atcontrast(r)) //   -3.151206   1.681
> 949     -6.447765    .1453536

Contrasts of predictive margins
Model VCE    : Bootstrap

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           6
               RESTRIC~1_sq    =          36

2._at        : RESTRI~mlag1    =           6
               RESTRIC~1_sq    =         100

3._at        : RESTRI~mlag1    =          10
               RESTRIC~1_sq    =          36

4._at        : RESTRI~mlag1    =          10
               RESTRIC~1_sq    =         100

------------------------------------------------
             |         df        chi2     P>chi2
-------------+----------------------------------
         _at |
   (2 vs 1)  |          1        9.43     0.0021
   (3 vs 1)  |          1        1.01     0.3142
   (4 vs 1)  |          1        3.32     0.0685
      Joint  |          3       84.54     0.0000
------------------------------------------------

--------------------------------------------------------------
             |            Delta-method
             |   Contrast   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
         _at |
   (2 vs 1)  |  -5.370375   1.748823     -8.798006   -1.942744
   (3 vs 1)  |   74.54073   74.06044     -70.61507    219.6965
   (4 vs 1)  |  -3.151206   1.729895     -6.541737     .239326
--------------------------------------------------------------

. set level 90

. margins, at(RESTRICT_COUNTdomlag1 = (6 10) RESTRICT_COUNTdomlag1_sq = (36 100)) contrast(atcontrast(r)) //    -3.151206   1.68
> 1949     -5.917765   -.3846459

Contrasts of predictive margins
Model VCE    : Bootstrap

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           6
               RESTRIC~1_sq    =          36

2._at        : RESTRI~mlag1    =           6
               RESTRIC~1_sq    =         100

3._at        : RESTRI~mlag1    =          10
               RESTRIC~1_sq    =          36

4._at        : RESTRI~mlag1    =          10
               RESTRIC~1_sq    =         100

------------------------------------------------
             |         df        chi2     P>chi2
-------------+----------------------------------
         _at |
   (2 vs 1)  |          1        9.43     0.0021
   (3 vs 1)  |          1        1.01     0.3142
   (4 vs 1)  |          1        3.32     0.0685
      Joint  |          3       84.54     0.0000
------------------------------------------------

--------------------------------------------------------------
             |            Delta-method
             |   Contrast   Std. Err.     [90% Conf. Interval]
-------------+------------------------------------------------
         _at |
   (2 vs 1)  |  -5.370375   1.748823     -8.246934   -2.493816
   (3 vs 1)  |   74.54073   74.06044     -47.27786    196.3593
   (4 vs 1)  |  -3.151206   1.729895     -5.996629   -.3057818
--------------------------------------------------------------

. set level 95

. margins, at(RESTRICT_COUNTdomlag1 = (7 10) RESTRICT_COUNTdomlag1_sq = (49 100)) contrast(atcontrast(r)) //   -3.151206   1.681
> 949     -6.447765    .1453536

Contrasts of predictive margins
Model VCE    : Bootstrap

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           7
               RESTRIC~1_sq    =          49

2._at        : RESTRI~mlag1    =           7
               RESTRIC~1_sq    =         100

3._at        : RESTRI~mlag1    =          10
               RESTRIC~1_sq    =          49

4._at        : RESTRI~mlag1    =          10
               RESTRIC~1_sq    =         100

------------------------------------------------
             |         df        chi2     P>chi2
-------------+----------------------------------
         _at |
   (2 vs 1)  |          1        8.27     0.0040
   (3 vs 1)  |          1        1.42     0.2331
   (4 vs 1)  |          1        4.38     0.0363
      Joint  |          3       84.54     0.0000
------------------------------------------------

--------------------------------------------------------------
             |            Delta-method
             |   Contrast   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
         _at |
   (2 vs 1)  |  -4.965667   1.726244     -8.349044   -1.582291
   (3 vs 1)  |   33.93152   28.45639     -21.84197    89.70502
   (4 vs 1)  |   -2.90309    1.38665     -5.620874   -.1853065
--------------------------------------------------------------

. margins, at(RESTRICT_COUNTdomlag1 = 0 RESTRICT_COUNTdomlag1_sq = 0 ) ///
>                          at(RESTRICT_COUNTdomlag1 = 1 RESTRICT_COUNTdomlag1_sq = 1 ) ///
>                          at(RESTRICT_COUNTdomlag1 = 2 RESTRICT_COUNTdomlag1_sq = 4 ) ///
>                          at(RESTRICT_COUNTdomlag1 = 3 RESTRICT_COUNTdomlag1_sq = 9 ) ///
>                          at(RESTRICT_COUNTdomlag1 = 4 RESTRICT_COUNTdomlag1_sq = 16 ) ///
>                          at(RESTRICT_COUNTdomlag1 = 5 RESTRICT_COUNTdomlag1_sq = 25 ) ///
>                          at(RESTRICT_COUNTdomlag1 = 6 RESTRICT_COUNTdomlag1_sq = 36 ) ///
>                          at(RESTRICT_COUNTdomlag1 = 7 RESTRICT_COUNTdomlag1_sq = 49 ) ///
>                          at(RESTRICT_COUNTdomlag1 = 8 RESTRICT_COUNTdomlag1_sq = 64 ) ///
>                          at(RESTRICT_COUNTdomlag1 = 9 RESTRICT_COUNTdomlag1_sq = 81 ) ///
>                          at(RESTRICT_COUNTdomlag1 = 10 RESTRICT_COUNTdomlag1_sq = 100 ) post

Predictive margins                              Number of obs     =      1,248
Model VCE    : Bootstrap

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           0
               RESTRIC~1_sq    =           0

2._at        : RESTRI~mlag1    =           1
               RESTRIC~1_sq    =           1

3._at        : RESTRI~mlag1    =           2
               RESTRIC~1_sq    =           4

4._at        : RESTRI~mlag1    =           3
               RESTRIC~1_sq    =           9

5._at        : RESTRI~mlag1    =           4
               RESTRIC~1_sq    =          16

6._at        : RESTRI~mlag1    =           5
               RESTRIC~1_sq    =          25

7._at        : RESTRI~mlag1    =           6
               RESTRIC~1_sq    =          36

8._at        : RESTRI~mlag1    =           7
               RESTRIC~1_sq    =          49

9._at        : RESTRI~mlag1    =           8
               RESTRIC~1_sq    =          64

10._at       : RESTRI~mlag1    =           9
               RESTRIC~1_sq    =          81

11._at       : RESTRI~mlag1    =          10
               RESTRIC~1_sq    =         100

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   .7262109   .1794308     4.05   0.000      .374533    1.077889
          2  |   1.340629   .2082403     6.44   0.000     .9324857    1.748773
          3  |   2.217485   .3548309     6.25   0.000     1.522029    2.912941
          4  |   3.286389   .6905581     4.76   0.000      1.93292    4.639858
          5  |   4.363985    1.11553     3.91   0.000     2.177588    6.550383
          6  |   5.192229   1.483543     3.50   0.000     2.284537     8.09992
          7  |   5.535164   1.682558     3.29   0.001     2.237411    8.832917
          8  |   5.287048   1.704121     3.10   0.002     1.947033    8.627064
          9  |    4.52483   1.626782     2.78   0.005     1.336395    7.713264
         10  |   3.469743    1.50665     2.30   0.021     .5167631    6.422724
         11  |   2.383958   1.324586     1.80   0.072    -.2121821    4.980098
------------------------------------------------------------------------------

. display _b[7._at] - _b[1._at]    // 4.8109192
4.8089527

. test _b[7._at] = _b[1._at]               

 ( 1)  - 1bn._at + 7._at = 0

           chi2(  1) =    7.07
         Prob > chi2 =    0.0079

. display _b[11._at]      - _b[7._at]      // -3.1527847
-3.1512056

. test _b[7._at] = _b[11._at]     

 ( 1)  7._at - 11._at = 0

           chi2(  1) =    3.32
         Prob > chi2 =    0.0685

. 
. marginsplot, recast(line) recastci(rarea)  ///
> yscale(range(0 10)) ylabel(0(2)10) ///
> plotopt(color(gs0) lwidth(1) ) ///
> ciopt(color(gs6) fintensity(10) lcolor(gs16) ) ///
> xlabel(1 "0" 2 "1" 3 "2" 4 "3" 5 "4" 6 "5" 7 "6" 8 "7" 9 "8" 10 "9" 11 "10") ///
> xtitle("Count of restriction types",size(large)) ///
> ytitle("Predicted number of UAs",size(large)) ///
> title("Model 4",size(large)) ///
> scheme(s1mono)

  Variables that uniquely identify margins: _atopt
  Multiple at() options specified:
      _atoption=1: RESTRICT_COUNTdomlag1 = 0 RESTRICT_COUNTdomlag1_sq = 0
      _atoption=2: RESTRICT_COUNTdomlag1 = 1 RESTRICT_COUNTdomlag1_sq = 1
      _atoption=3: RESTRICT_COUNTdomlag1 = 2 RESTRICT_COUNTdomlag1_sq = 4
      _atoption=4: RESTRICT_COUNTdomlag1 = 3 RESTRICT_COUNTdomlag1_sq = 9
      _atoption=5: RESTRICT_COUNTdomlag1 = 4 RESTRICT_COUNTdomlag1_sq = 16
      _atoption=6: RESTRICT_COUNTdomlag1 = 5 RESTRICT_COUNTdomlag1_sq = 25
      _atoption=7: RESTRICT_COUNTdomlag1 = 6 RESTRICT_COUNTdomlag1_sq = 36
      _atoption=8: RESTRICT_COUNTdomlag1 = 7 RESTRICT_COUNTdomlag1_sq = 49
      _atoption=9: RESTRICT_COUNTdomlag1 = 8 RESTRICT_COUNTdomlag1_sq = 64
      _atoption=10: RESTRICT_COUNTdomlag1 = 9 RESTRICT_COUNTdomlag1_sq = 81
      _atoption=11: RESTRICT_COUNTdomlag1 = 10 RESTRICT_COUNTdomlag1_sq = 100

. graph export ".\Figures\Manuscript_Figure3c.png", replace
(file .\Figures\Manuscript_Figure3c.png written in PNG format)

. 
. 
. 
. 
. ******************************************************************************
. ** Model 4: GMM: Instrumental Variable Poisson with bootstrapped standard errors; only all endogenous variables instrumented
. ******************************************************************************
. 
. ** Test of endogeneity
. capture drop vhat3

. capture drop vhat4

. capture drop vhat5

. capture drop vhat6

. capture drop vhat7

. capture drop vhat8

. capture drop vhat9

. #delimit ;
delimiter now ;
. reg PTS_Slag1 gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 PTS_Slag2, vce(boot, reps(20) cl(cowcode)) ;
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      2,279
                                                Replications      =         20
                                                Wald chi2(6)      =   11061.86
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.7616
                                                Adj R-squared     =     0.7610
                                                Root MSE          =     0.5690

                                               (Replications based on 169 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
                   PTS_Slag1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
   gdp_pc_constantUS2010lag1 |  -.1510194   .0223336    -6.76   0.000    -.1947926   -.1072463
gdp_pc_constantUS2010lag1_sq |   .0262482   .0066308     3.96   0.000     .0132521    .0392442
                   KOFGIlag1 |  -.0039297   .0081001    -0.49   0.628    -.0198056    .0119462
                KOFGIlag1_sq |   .0000394   .0000652     0.60   0.546    -.0000885    .0001672
              populationlag1 |   .0417515   .0190687     2.19   0.029     .0043775    .0791255
                   PTS_Slag2 |   .8060869   .0157101    51.31   0.000     .7752957    .8368781
                       _cons |   .5310227   .2346736     2.26   0.024     .0710709    .9909744
----------------------------------------------------------------------------------------------

. predict vhat3, resid ;
(603 missing values generated)

. reg hrgroupslag1 gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 hrgroupslag2, vce(boot, reps(20) cl(cowcode)) ;
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      1,309
                                                Replications      =         20
                                                Wald chi2(6)      =   31084.30
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.8875
                                                Adj R-squared     =     0.8869
                                                Root MSE          =    17.0841

                                               (Replications based on 176 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
                hrgroupslag1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
   gdp_pc_constantUS2010lag1 |  -3.434579   .7205711    -4.77   0.000    -4.846872   -2.022285
gdp_pc_constantUS2010lag1_sq |   .5829317   .3069787     1.90   0.058    -.0187355    1.184599
                   KOFGIlag1 |  -.5939038   .1505472    -3.94   0.000    -.8889709   -.2988366
                KOFGIlag1_sq |   .0077254    .001778     4.35   0.000     .0042407    .0112102
              populationlag1 |  -1.410077   .4577975    -3.08   0.002    -2.307344   -.5128106
                hrgroupslag2 |   .9814403   .0151471    64.79   0.000     .9517526    1.011128
                       _cons |   14.06462   3.639849     3.86   0.000     6.930644    21.19859
----------------------------------------------------------------------------------------------

. predict vhat4, resid ;
(1,573 missing values generated)

. reg hrnewslag1 gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 hrnewslag2, vce(boot, reps(20) cl(cowcode)) ;
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      1,573
                                                Replications      =         20
                                                Wald chi2(6)      =     274.86
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.3967
                                                Adj R-squared     =     0.3944
                                                Root MSE          =     0.8839

                                               (Replications based on 178 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
                  hrnewslag1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
   gdp_pc_constantUS2010lag1 |  -.0249602   .0730332    -0.34   0.733    -.1681027    .1181823
gdp_pc_constantUS2010lag1_sq |   .0002959    .015965     0.02   0.985     -.030995    .0315867
                   KOFGIlag1 |    .008712   .0110152     0.79   0.429    -.0128773    .0303013
                KOFGIlag1_sq |  -.0000775   .0000905    -0.86   0.392     -.000255    .0000999
              populationlag1 |   -.028404   .0432697    -0.66   0.512     -.113211    .0564029
                  hrnewslag2 |   .5476436   .0379475    14.43   0.000     .4732679    .6220193
                       _cons |  -.0814538    .304614    -0.27   0.789    -.6784863    .5155786
----------------------------------------------------------------------------------------------

. predict vhat5, resid ;
(1,309 missing values generated)

. reg protest_ClarkRegan_loglag1 gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 protest_ClarkRegan_loglag2, vce(boot, reps(20) cl(cowcode)) ;
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      2,071
                                                Replications      =         20
                                                Wald chi2(6)      =    1022.12
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.3691
                                                Adj R-squared     =     0.3673
                                                Root MSE          =     0.7051

                                               (Replications based on 152 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
  protest_ClarkRegan_loglag1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
   gdp_pc_constantUS2010lag1 |  -.0654719   .0654843    -1.00   0.317    -.1938188    .0628751
gdp_pc_constantUS2010lag1_sq |  -.0109781   .0221765    -0.50   0.621    -.0544432    .0324869
                   KOFGIlag1 |   .0119496   .0127276     0.94   0.348     -.012996    .0368952
                KOFGIlag1_sq |  -.0000803   .0001214    -0.66   0.508    -.0003183    .0001577
              populationlag1 |  -.0393505   .0371381    -1.06   0.289    -.1121397    .0334388
  protest_ClarkRegan_loglag2 |   .5800565   .0325499    17.82   0.000     .5162598    .6438532
                       _cons |   .0000661   .3110761     0.00   1.000    -.6096318    .6097641
----------------------------------------------------------------------------------------------

. predict vhat6, resid ;
(811 missing values generated)

. reg UCDP_armedConflictlag1 gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 UCDP_armedConflictlag2, vce(boot, reps(20) cl(cowcode)) ;
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      2,244
                                                Replications      =         20
                                                Wald chi2(6)      =    1166.85
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.6218
                                                Adj R-squared     =     0.6207
                                                Root MSE          =     0.2273

                                               (Replications based on 165 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
      UCDP_armedConflictlag1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
   gdp_pc_constantUS2010lag1 |  -.0098038   .0127287    -0.77   0.441    -.0347516    .0151441
gdp_pc_constantUS2010lag1_sq |   .0011061   .0034001     0.33   0.745     -.005558    .0077702
                   KOFGIlag1 |  -.0059281   .0028083    -2.11   0.035    -.0114324   -.0004239
                KOFGIlag1_sq |    .000045   .0000215     2.10   0.036     2.95e-06    .0000871
              populationlag1 |   .0033715   .0111079     0.30   0.761    -.0183996    .0251426
      UCDP_armedConflictlag2 |   .7583442   .0293152    25.87   0.000     .7008875    .8158009
                       _cons |   .2122195   .0903072     2.35   0.019     .0352207    .3892183
----------------------------------------------------------------------------------------------

. predict vhat7, resid ;
(638 missing values generated)

. reg PR_freedomHouselag1 gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 PR_freedomHouselag2, vce(boot, reps(20) cl(cowcode)) ;
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      2,392
                                                Replications      =         20
                                                Wald chi2(6)      =   70042.58
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.9424
                                                Adj R-squared     =     0.9423
                                                Root MSE          =     0.5194

                                               (Replications based on 176 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
         PR_freedomHouselag1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
   gdp_pc_constantUS2010lag1 |    .018762   .0288525     0.65   0.516    -.0377878    .0753118
gdp_pc_constantUS2010lag1_sq |  -.0009895   .0084652    -0.12   0.907    -.0175809    .0156019
                   KOFGIlag1 |  -.0055951   .0051984    -1.08   0.282    -.0157838    .0045937
                KOFGIlag1_sq |   .0000103   .0000433     0.24   0.812    -.0000746    .0000952
              populationlag1 |   -.000544   .0232861    -0.02   0.981    -.0461839    .0450959
         PR_freedomHouselag2 |   .9538828   .0078335   121.77   0.000     .9385295    .9692362
                       _cons |    .411751   .1611162     2.56   0.011      .095969     .727533
----------------------------------------------------------------------------------------------

. predict vhat8, resid ;
(490 missing values generated)

. reg PR_freedomHouselag1_sq gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 PR_freedomHouselag2_sq, vce(boot, reps(20) cl(cowcode)) ;
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      2,392
                                                Replications      =         20
                                                Wald chi2(6)      =   57328.15
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.9246
                                                Adj R-squared     =     0.9244
                                                Root MSE          =     4.6144

                                               (Replications based on 176 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
      PR_freedomHouselag1_sq |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
   gdp_pc_constantUS2010lag1 |   .1758036   .2168235     0.81   0.417    -.2491626    .6007698
gdp_pc_constantUS2010lag1_sq |  -.0172909   .0527006    -0.33   0.743    -.1205822    .0860005
                   KOFGIlag1 |  -.0596632   .0335024    -1.78   0.075    -.1253266    .0060003
                KOFGIlag1_sq |   .0001652   .0002412     0.68   0.493    -.0003076     .000638
              populationlag1 |  -.1340947   .1499651    -0.89   0.371     -.428021    .1598316
      PR_freedomHouselag2_sq |   .9452816   .0078343   120.66   0.000     .9299266    .9606366
                       _cons |   3.500302   1.165504     3.00   0.003     1.215957    5.784648
----------------------------------------------------------------------------------------------

. predict vhat9, resid ;
(490 missing values generated)

. poisson urgentActions gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 
> RESTRICT_COUNTdomlag2 RESTRICT_COUNTdomlag2_sq
> PTS_Slag2 hrgroupslag2 hrnewslag2 
> protest_ClarkRegan_loglag2 UCDP_armedConflictlag2 
> PR_freedomHouselag2 PR_freedomHouselag2_sq 
> vhat*, vce(boot, reps(20) cl(cowcode)) ;
(running poisson on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Poisson regression                              Number of obs     =      1,105
                                                Replications      =         20
                                                Wald chi2(19)     =          .
                                                Prob > chi2       =          .
Log likelihood = -2466.3401                     Pseudo R2         =     0.4410

                                               (Replications based on 147 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
               urgentActions |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
   gdp_pc_constantUS2010lag1 |   .9375543   .5138494     1.82   0.068    -.0695721    1.944681
gdp_pc_constantUS2010lag1_sq |  -.3998761    .300464    -1.33   0.183    -.9887748    .1890225
                   KOFGIlag1 |   .0822387   .0593636     1.39   0.166    -.0341119    .1985893
                KOFGIlag1_sq |  -.0008593   .0006265    -1.37   0.170    -.0020872    .0003686
              populationlag1 |   .0128479   .3185805     0.04   0.968    -.6115584    .6372543
       RESTRICT_COUNTdomlag2 |   .4988676   .1253436     3.98   0.000     .2531987    .7445365
    RESTRICT_COUNTdomlag2_sq |  -.0414873   .0136033    -3.05   0.002    -.0681492   -.0148253
                   PTS_Slag2 |   .4582567   .1186273     3.86   0.000     .2257514     .690762
                hrgroupslag2 |  -.0011173   .0041782    -0.27   0.789    -.0093065    .0070719
                  hrnewslag2 |   .1215486   .0286167     4.25   0.000      .065461    .1776362
  protest_ClarkRegan_loglag2 |   .2717953   .0866365     3.14   0.002     .1019909    .4415998
      UCDP_armedConflictlag2 |   .1965626   .1903182     1.03   0.302    -.1764543    .5695794
         PR_freedomHouselag2 |   .4230744   .2789014     1.52   0.129    -.1235623    .9697111
      PR_freedomHouselag2_sq |  -.0511909   .0306002    -1.67   0.094    -.1111661    .0087843
                       vhat1 |    .111073   .1195751     0.93   0.353    -.1232899    .3454359
                       vhat2 |  -.0022734   .0136495    -0.17   0.868     -.029026    .0244792
                       vhat3 |     .33891   .0808322     4.19   0.000     .1804817    .4973383
                       vhat4 |  -.0023345   .0036725    -0.64   0.525    -.0095325    .0048635
                       vhat5 |   .0608592   .0209258     2.91   0.004     .0198454     .101873
                       vhat6 |   .1946418   .0691941     2.81   0.005      .059024    .3302597
                       vhat7 |   .2911791   .2027922     1.44   0.151    -.1062863    .6886444
                       vhat8 |   .8219233    .372864     2.20   0.027     .0911233    1.552723
                       vhat9 |  -.0725913   .0366914    -1.98   0.048    -.1445051   -.0006776
                       _cons |  -3.835956   1.593277    -2.41   0.016    -6.958721   -.7131907
----------------------------------------------------------------------------------------------

. test vhat3 vhat4 vhat5 vhat6 vhat7 vhat8 vhat9 ;

 ( 1)  [urgentActions]vhat3 = 0
 ( 2)  [urgentActions]vhat4 = 0
 ( 3)  [urgentActions]vhat5 = 0
 ( 4)  [urgentActions]vhat6 = 0
 ( 5)  [urgentActions]vhat7 = 0
 ( 6)  [urgentActions]vhat8 = 0
 ( 7)  [urgentActions]vhat9 = 0

           chi2(  7) =   58.13
         Prob > chi2 =    0.0000

. test vhat3 ;

 ( 1)  [urgentActions]vhat3 = 0

           chi2(  1) =   17.58
         Prob > chi2 =    0.0000

.  test vhat4 ;

 ( 1)  [urgentActions]vhat4 = 0

           chi2(  1) =    0.40
         Prob > chi2 =    0.5250

.  // hrgroupslag1 n.s.
> test vhat5 ;

 ( 1)  [urgentActions]vhat5 = 0

           chi2(  1) =    8.46
         Prob > chi2 =    0.0036

.  // hrnewslag1 n.s.
> test vhat6 ;

 ( 1)  [urgentActions]vhat6 = 0

           chi2(  1) =    7.91
         Prob > chi2 =    0.0049

. test vhat7 ;

 ( 1)  [urgentActions]vhat7 = 0

           chi2(  1) =    2.06
         Prob > chi2 =    0.1510

.  // UCDP_armedConflict n.s.
> test vhat8 ;

 ( 1)  [urgentActions]vhat8 = 0

           chi2(  1) =    4.86
         Prob > chi2 =    0.0275

.  test vhat9 ;

 ( 1)  [urgentActions]vhat9 = 0

           chi2(  1) =    3.91
         Prob > chi2 =    0.0479

.  // PR_freedomHouselag1_sq n.s.
> #delimit cr
delimiter now cr
. 
. ** Test endogeneity with transformed DV (OLS)
. capture gen urgentActions_log = log(urgentActions+1)

. * H0: Potential EVVs may be treated as exogenous
. tsset cowcode YEAR
       panel variable:  cowcode (unbalanced)
        time variable:  YEAR, 1994 to 2007, but with a gap
                delta:  1 unit

. #delimit ;
delimiter now ;
. ivreg2 urgentActions_log
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1
> (RESTRICT_COUNTdomlag1 RESTRICT_COUNTdomlag1_sq
> PTS_Slag1 hrgroupslag1 hrnewslag1 
> protest_ClarkRegan_loglag1 UCDP_armedConflictlag1 
> PR_freedomHouselag1 PR_freedomHouselag1_sq =
> RESTRICT_COUNTdomlag2 RESTRICT_COUNTdomlag3 RESTRICT_COUNTdomlag2_sq
> PTS_Slag2 hrgroupslag2 hrnewslag2 
> protest_ClarkRegan_loglag2 UCDP_armedConflictlag2 
> PR_freedomHouselag2 PR_freedomHouselag2_sq), 
> gmm cluster(cowcode)
> endogtest(RESTRICT_COUNTdomlag1 RESTRICT_COUNTdomlag1_sq 
> PTS_Slag1 hrgroupslag1 hrnewslag1 
> protest_ClarkRegan_loglag1 UCDP_armedConflictlag1 
> PR_freedomHouselag1 PR_freedomHouselag1_sq) ;
-gmm- is no longer a supported option; use -gmm2s- with the appropriate option
      gmm             =  gmm2s robust
      gmm robust      =  gmm2s robust
      gmm bw()        =  gmm2s bw()
      gmm robust bw() =  gmm2s robust bw()
      gmm cluster()   =  gmm2s cluster()

2-Step GMM estimation
---------------------

Estimates efficient for arbitrary heteroskedasticity and clustering on cowcode
Statistics robust to heteroskedasticity and clustering on cowcode

Number of clusters (cowcode) = 147                    Number of obs =     1105
                                                      F( 14,   146) =    26.24
                                                      Prob > F      =   0.0000
Total (centered) SS     =  820.3951976                Centered R2   =   0.3596
Total (uncentered) SS   =  1225.004278                Uncentered R2 =   0.5711
Residual SS             =  525.3806869                Root MSE      =    .6895

----------------------------------------------------------------------------------------------
                             |               Robust
           urgentActions_log |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
       RESTRICT_COUNTdomlag1 |   .2783002    .073506     3.79   0.000     .1342311    .4223694
    RESTRICT_COUNTdomlag1_sq |  -.0203678   .0071013    -2.87   0.004    -.0342861   -.0064495
                   PTS_Slag1 |   .2962867   .0811009     3.65   0.000     .1373319    .4552415
                hrgroupslag1 |  -.0013773   .0011348    -1.21   0.225    -.0036015    .0008469
                  hrnewslag1 |   .3648057    .101576     3.59   0.000     .1657203    .5638911
  protest_ClarkRegan_loglag1 |   .1005438   .0751228     1.34   0.181    -.0466941    .2477817
      UCDP_armedConflictlag1 |  -.0165632   .2218886    -0.07   0.940    -.4514569    .4183304
         PR_freedomHouselag1 |   .0331543   .0964444     0.34   0.731    -.1558732    .2221818
      PR_freedomHouselag1_sq |  -.0106468   .0137423    -0.77   0.438    -.0375813    .0162877
   gdp_pc_constantUS2010lag1 |     .16639   .0987197     1.69   0.092    -.0270971    .3598771
gdp_pc_constantUS2010lag1_sq |   -.025522   .0198025    -1.29   0.197    -.0643341    .0132901
                   KOFGIlag1 |   .0159742   .0164329     0.97   0.331    -.0162338    .0481821
                KOFGIlag1_sq |    -.00011   .0001542    -0.71   0.476    -.0004123    .0001923
              populationlag1 |  -.0006214   .0638707    -0.01   0.992    -.1258057    .1245628
                       _cons |  -.9813093   .5223057    -1.88   0.060     -2.00501    .0423911
----------------------------------------------------------------------------------------------
Underidentification test (Kleibergen-Paap rk LM statistic):             29.759
                                                   Chi-sq(2) P-val =    0.0000
------------------------------------------------------------------------------
Weak identification test (Kleibergen-Paap rk Wald F statistic):          9.510
Stock-Yogo weak ID test critical values:                       <not available>
------------------------------------------------------------------------------
Hansen J statistic (overidentification test of all instruments):         0.398
                                                   Chi-sq(1) P-val =    0.5282
-endog- option:
Endogeneity test of endogenous regressors:                              29.806
                                                   Chi-sq(9) P-val =    0.0005
Regressors tested:    RESTRICT_COUNTdomlag1 RESTRICT_COUNTdomlag1_sq PTS_Slag1
                      hrgroupslag1 hrnewslag1 protest_ClarkRegan_loglag1
                      UCDP_armedConflictlag1 PR_freedomHouselag1
                      PR_freedomHouselag1_sq
------------------------------------------------------------------------------
Collinearities detected among instruments: 1 instrument(s) dropped
Instrumented:         RESTRICT_COUNTdomlag1 RESTRICT_COUNTdomlag1_sq PTS_Slag1
                      hrgroupslag1 hrnewslag1 protest_ClarkRegan_loglag1
                      UCDP_armedConflictlag1 PR_freedomHouselag1
                      PR_freedomHouselag1_sq
Included instruments: gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq
                      KOFGIlag1 KOFGIlag1_sq populationlag1
Excluded instruments: RESTRICT_COUNTdomlag2 RESTRICT_COUNTdomlag3
                      RESTRICT_COUNTdomlag2_sq PTS_Slag2 hrgroupslag2 hrnewslag2
                      protest_ClarkRegan_loglag2 UCDP_armedConflictlag2
                      PR_freedomHouselag2 PR_freedomHouselag2_sq
------------------------------------------------------------------------------

. #delimit cr
delimiter now cr
. * The endogeneity test can reject its null that the potential IIV may be treated as exogenous; they ARE ENDOGENOUS
. * Hansen's J: We can NOT reject the null hypothesis that instruments are uncorrelated with the errors; instruments ARE JOINTLY
>  VALID
. * Kleibergen-Paap / underidentification: We can reject the null hypothesis of underidentification; Instruments ARE RELEVANT
. 
. 
. 
. ** Test of instruments
. tsset, clear

. * PTS_Slag1
. #delimit ;
delimiter now ;
. reg PTS_Slag1 RESTRICT_COUNTdomlag1_sq RESTRICT_COUNTdomlag1
> PTS_Slag2 hrgroupslag1 hrnewslag1 
> protest_ClarkRegan_loglag1 UCDP_armedConflictlag1 
> PR_freedomHouselag1 PR_freedomHouselag1_sq 
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1, vce(boot, reps(20) cl(cowcode));
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      1,250
                                                Replications      =         20
                                                Wald chi2(14)     =   30915.44
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.7945
                                                Adj R-squared     =     0.7922
                                                Root MSE          =     0.4986

                                               (Replications based on 147 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
                   PTS_Slag1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
    RESTRICT_COUNTdomlag1_sq |  -.0057661     .00219    -2.63   0.008    -.0100584   -.0014737
       RESTRICT_COUNTdomlag1 |   .0649662   .0226945     2.86   0.004     .0204858    .1094466
                   PTS_Slag2 |    .593788   .0307634    19.30   0.000     .5334929    .6540831
                hrgroupslag1 |   .0028953   .0004254     6.81   0.000     .0020615    .0037292
                  hrnewslag1 |   .0270827   .0109657     2.47   0.014     .0055902    .0485751
  protest_ClarkRegan_loglag1 |   .0277627   .0197877     1.40   0.161    -.0110205     .066546
      UCDP_armedConflictlag1 |   .4454589   .0553656     8.05   0.000     .3369442    .5539735
         PR_freedomHouselag1 |   .0142324   .0438152     0.32   0.745    -.0716439    .1001087
      PR_freedomHouselag1_sq |   .0059315    .005549     1.07   0.285    -.0049444    .0168074
   gdp_pc_constantUS2010lag1 |  -.1714352   .0391739    -4.38   0.000    -.2482146   -.0946559
gdp_pc_constantUS2010lag1_sq |   .0263047   .0123239     2.13   0.033     .0021503    .0504591
                   KOFGIlag1 |    .020331   .0083171     2.44   0.015     .0040298    .0366323
                KOFGIlag1_sq |  -.0001942   .0000674    -2.88   0.004    -.0003262   -.0000621
              populationlag1 |   .0656973   .0280251     2.34   0.019      .010769    .1206255
                       _cons |   .0214292   .2323616     0.09   0.927    -.4339911    .4768496
----------------------------------------------------------------------------------------------

. #delimit cr
delimiter now cr
. * protest_ClarkRegan_loglag1
. #delimit ;
delimiter now ;
. reg protest_ClarkRegan_loglag1 RESTRICT_COUNTdomlag1_sq RESTRICT_COUNTdomlag1
> PTS_Slag1 hrgroupslag1 hrnewslag2
> protest_ClarkRegan_loglag2 UCDP_armedConflictlag1 
> PR_freedomHouselag1 PR_freedomHouselag1_sq 
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1, vce(boot, reps(20) cl(cowcode));
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      1,250
                                                Replications      =         20
                                                Wald chi2(14)     =    1125.25
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.4023
                                                Adj R-squared     =     0.3955
                                                Root MSE          =     0.6886

                                               (Replications based on 147 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
  protest_ClarkRegan_loglag1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
    RESTRICT_COUNTdomlag1_sq |  -.0040468   .0036903    -1.10   0.273    -.0112797    .0031861
       RESTRICT_COUNTdomlag1 |   .0220825   .0362703     0.61   0.543     -.049006     .093171
                   PTS_Slag1 |   .0275598   .0310747     0.89   0.375    -.0333454     .088465
                hrgroupslag1 |     .00251   .0006689     3.75   0.000      .001199    .0038209
                  hrnewslag2 |   .0236536    .019531     1.21   0.226    -.0146265    .0619336
  protest_ClarkRegan_loglag2 |   .5492419   .0532501    10.31   0.000     .4448736    .6536101
      UCDP_armedConflictlag1 |   -.018357   .0769786    -0.24   0.812    -.1692323    .1325182
         PR_freedomHouselag1 |  -.0189663   .0643618    -0.29   0.768    -.1451132    .1071806
      PR_freedomHouselag1_sq |   .0000661   .0075414     0.01   0.993    -.0147148     .014847
   gdp_pc_constantUS2010lag1 |   .0845267   .0706343     1.20   0.231    -.0539141    .2229674
gdp_pc_constantUS2010lag1_sq |   -.033696    .018074    -1.86   0.062    -.0691204    .0017285
                   KOFGIlag1 |   .0222727   .0129324     1.72   0.085    -.0030743    .0476196
                KOFGIlag1_sq |  -.0002584   .0001215    -2.13   0.033    -.0004967   -.0000202
              populationlag1 |  -.0426518   .0507239    -0.84   0.400    -.1420687    .0567651
                       _cons |  -.1111738   .3692362    -0.30   0.763    -.8348634    .6125157
----------------------------------------------------------------------------------------------

. #delimit cr
delimiter now cr
. * PR_freedomHouselag1 
. #delimit ;
delimiter now ;
. reg PR_freedomHouselag1  RESTRICT_COUNTdomlag1_sq RESTRICT_COUNTdomlag1
> PTS_Slag1 hrgroupslag1 hrnewslag1
> protest_ClarkRegan_loglag1 UCDP_armedConflictlag1
> PR_freedomHouselag2 PR_freedomHouselag1_sq 
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1, vce(boot, reps(20) cl(cowcode));
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      1,250
                                                Replications      =         20
                                                Wald chi2(14)     =   97804.95
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.9847
                                                Adj R-squared     =     0.9845
                                                Root MSE          =     0.2638

                                               (Replications based on 147 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
         PR_freedomHouselag1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
    RESTRICT_COUNTdomlag1_sq |  -.0089257   .0021794    -4.10   0.000    -.0131973   -.0046541
       RESTRICT_COUNTdomlag1 |   .0692508    .024013     2.88   0.004     .0221863    .1163154
                   PTS_Slag1 |   .0101847   .0187335     0.54   0.587    -.0265322    .0469017
                hrgroupslag1 |  -.0002674    .000403    -0.66   0.507    -.0010572    .0005224
                  hrnewslag1 |   -.017936    .007072    -2.54   0.011    -.0317968   -.0040752
  protest_ClarkRegan_loglag1 |   .0166091   .0160657     1.03   0.301    -.0148792    .0480974
      UCDP_armedConflictlag1 |   .0148516   .0452335     0.33   0.743    -.0738044    .1035076
         PR_freedomHouselag2 |   .3398466   .0410342     8.28   0.000      .259421    .4202721
      PR_freedomHouselag1_sq |   .0803542   .0041958    19.15   0.000     .0721307    .0885778
   gdp_pc_constantUS2010lag1 |  -.0034364   .0618963    -0.06   0.956    -.1247509     .117878
gdp_pc_constantUS2010lag1_sq |   .0055931   .0186683     0.30   0.764    -.0309962    .0421824
                   KOFGIlag1 |   .0309561   .0080623     3.84   0.000     .0151542     .046758
                KOFGIlag1_sq |  -.0002943   .0000926    -3.18   0.001    -.0004758   -.0001128
              populationlag1 |   .0748567   .0412602     1.81   0.070    -.0060118    .1557251
                       _cons |   .1677188   .2255636     0.74   0.457    -.2743776    .6098153
----------------------------------------------------------------------------------------------

. #delimit cr
delimiter now cr
. * PR_freedomHouselag1_sq
. #delimit ;
delimiter now ;
. reg PR_freedomHouselag1_sq  RESTRICT_COUNTdomlag1_sq RESTRICT_COUNTdomlag1
> PTS_Slag1 hrgroupslag1 hrnewslag1
> protest_ClarkRegan_loglag1 UCDP_armedConflictlag1
> PR_freedomHouselag1 PR_freedomHouselag2_sq 
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1, vce(boot, reps(20) cl(cowcode));
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      1,250
                                                Replications      =         20
                                                Wald chi2(14)     =  172998.02
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.9793
                                                Adj R-squared     =     0.9790
                                                Root MSE          =     2.3927

                                               (Replications based on 147 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
      PR_freedomHouselag1_sq |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
    RESTRICT_COUNTdomlag1_sq |   .0734003   .0133768     5.49   0.000     .0471822    .0996184
       RESTRICT_COUNTdomlag1 |  -.4998604   .1488188    -3.36   0.001    -.7915398    -.208181
                   PTS_Slag1 |  -.1015122   .1957148    -0.52   0.604    -.4851061    .2820818
                hrgroupslag1 |   .0031596   .0019877     1.59   0.112    -.0007361    .0070553
                  hrnewslag1 |   .0284641   .1629125     0.17   0.861    -.2908385    .3477668
  protest_ClarkRegan_loglag1 |  -.0574959   .1102209    -0.52   0.602    -.2735249    .1585331
      UCDP_armedConflictlag1 |  -.0238866   .3707718    -0.06   0.949    -.7505859    .7028126
         PR_freedomHouselag1 |   5.954404   .3696448    16.11   0.000     5.229913    6.678894
      PR_freedomHouselag2_sq |   .2642852   .0394594     6.70   0.000     .1869461    .3416243
   gdp_pc_constantUS2010lag1 |   .0491457   .7730938     0.06   0.949     -1.46609    1.564382
gdp_pc_constantUS2010lag1_sq |  -.0411599   .2775638    -0.15   0.882    -.5851749    .5028552
                   KOFGIlag1 |  -.2706273   .0716009    -3.78   0.000    -.4109625    -.130292
                KOFGIlag1_sq |   .0025179   .0006948     3.62   0.000     .0011561    .0038797
              populationlag1 |  -.7866805   .3374294    -2.33   0.020     -1.44803    -.125331
                       _cons |  -1.717505   2.297851    -0.75   0.455     -6.22121      2.7862
----------------------------------------------------------------------------------------------

. #delimit cr
delimiter now cr
. 
. 
. ** GMM
. xtset, clear

. #delimit ;
delimiter now ;
. ivpoisson gmm urgentActions
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq 
> hrgroupslag1 hrnewslag1 
> populationlag1  UCDP_armedConflictlag1 
> (RESTRICT_COUNTdomlag1 RESTRICT_COUNTdomlag1_sq 
> PTS_Slag1 PR_freedomHouselag1 PR_freedomHouselag1_sq
> protest_ClarkRegan_loglag1 = 
>         RESTRICT_COUNTdomlag2 RESTRICT_COUNTdomlag3
>         RESTRICT_COUNTdomlag2_sq
>         PTS_Slag2 
>         PR_freedomHouselag2
>         PR_freedomHouselag2_sq 
>         protest_ClarkRegan_loglag2 )
> , twostep vce(boot, reps(50) cl(cowcode) seed(1)) ;
(running ivpoisson on estimation sample)

Bootstrap replications (50)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50

Exponential mean model with endogenous regressors

Number of parameters =  15                         Number of obs  =      1,248
Number of moments    =  16
Initial weight matrix: Unadjusted
GMM weight matrix:     Robust

                                               (Replications based on 147 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
               urgentActions |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
       RESTRICT_COUNTdomlag1 |   .7096378   .1791405     3.96   0.000     .3585289    1.060747
    RESTRICT_COUNTdomlag1_sq |  -.0589231   .0174998    -3.37   0.001    -.0932221   -.0246241
                   PTS_Slag1 |   .6533132   .2119961     3.08   0.002     .2378086    1.068818
         PR_freedomHouselag1 |   .1832663   .3591589     0.51   0.610    -.5206722    .8872049
      PR_freedomHouselag1_sq |  -.0295307    .040586    -0.73   0.467    -.1090777    .0500164
  protest_ClarkRegan_loglag1 |    .370102   .1875092     1.97   0.048     .0025907    .7376134
   gdp_pc_constantUS2010lag1 |   .9884136   .5109136     1.93   0.053    -.0129586    1.989786
gdp_pc_constantUS2010lag1_sq |  -.4187221    .332053    -1.26   0.207    -1.069534    .2320898
                   KOFGIlag1 |   .0771945   .0523638     1.47   0.140    -.0254366    .1798256
                KOFGIlag1_sq |  -.0007251   .0005123    -1.42   0.157    -.0017292    .0002791
                hrgroupslag1 |  -.0035377   .0043138    -0.82   0.412    -.0119926    .0049171
                  hrnewslag1 |   .1042311   .0352717     2.96   0.003     .0350998    .1733625
              populationlag1 |   .0093456   .1877161     0.05   0.960    -.3585712    .3772624
      UCDP_armedConflictlag1 |   .1469823   .3099074     0.47   0.635     -.460425    .7543896
                       _cons |  -4.211552   1.563472    -2.69   0.007      -7.2759   -1.147203
----------------------------------------------------------------------------------------------
Instrumented:  RESTRICT_COUNTdomlag1 RESTRICT_COUNTdomlag1_sq PTS_Slag1 PR_freedomHouselag1
               PR_freedomHouselag1_sq protest_ClarkRegan_loglag1
Instruments:   gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq KOFGIlag1 KOFGIlag1_sq
               hrgroupslag1 hrnewslag1 populationlag1 UCDP_armedConflictlag1
               RESTRICT_COUNTdomlag2 RESTRICT_COUNTdomlag3 RESTRICT_COUNTdomlag2_sq
               PTS_Slag2 PR_freedomHouselag2 PR_freedomHouselag2_sq
               protest_ClarkRegan_loglag2

. #delimit cr
delimiter now cr
. estat overid 

  Test of overidentifying restriction:

  Hansen's J chi2(1) = .041207 (p = 0.8391)

. 
. mat es_ic = r(J) 

. matrix list es_ic

symmetric es_ic[1,1]
           c1
r1  .04120702

. local J: display %4.1f es_ic[1,1]

. outreg2 using ".\Tables\Manuscript_Table1.doc", append ///
>  ctitle("Model 6") label  eqdrop(lnalpha) dec(3) ///
> alpha(0.001, 0.01, 0.05, 0.1) symbol(***,**, *, +) ///
> addtext(Hansen's J, `J')
.\Tables\Manuscript_Table1.doc
dir : seeout

. 
. margins, at(RESTRICT_COUNTdomlag1 = (0 6) RESTRICT_COUNTdomlag1_sq = (0 36)) contrast(atcontrast(r)) //     5.126616   2.13557
> 9      .9409588    9.312273

Contrasts of predictive margins
Model VCE    : Bootstrap

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           0
               RESTRIC~1_sq    =           0

2._at        : RESTRI~mlag1    =           0
               RESTRIC~1_sq    =          36

3._at        : RESTRI~mlag1    =           6
               RESTRIC~1_sq    =           0

4._at        : RESTRI~mlag1    =           6
               RESTRIC~1_sq    =          36

------------------------------------------------
             |         df        chi2     P>chi2
-------------+----------------------------------
         _at |
   (2 vs 1)  |          1       18.40     0.0000
   (3 vs 1)  |          1        1.27     0.2607
   (4 vs 1)  |          1        6.04     0.0140
      Joint  |          3       70.37     0.0000
------------------------------------------------

--------------------------------------------------------------
             |            Delta-method
             |   Contrast   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
         _at |
   (2 vs 1)  |  -.6038103   .1407728     -.8797199   -.3279006
   (3 vs 1)  |    47.7882   42.48383     -35.47858     131.055
   (4 vs 1)  |   5.125217   2.085282      1.038139    9.212295
--------------------------------------------------------------

. margins, at(RESTRICT_COUNTdomlag1 = (6 10) RESTRICT_COUNTdomlag1_sq = (36 100)) contrast(atcontrast(r))  //   -3.525839   1.71
> 8657     -6.894346   -.1573325

Contrasts of predictive margins
Model VCE    : Bootstrap

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           6
               RESTRIC~1_sq    =          36

2._at        : RESTRI~mlag1    =           6
               RESTRIC~1_sq    =         100

3._at        : RESTRI~mlag1    =          10
               RESTRIC~1_sq    =          36

4._at        : RESTRI~mlag1    =          10
               RESTRIC~1_sq    =         100

------------------------------------------------
             |         df        chi2     P>chi2
-------------+----------------------------------
         _at |
   (2 vs 1)  |          1        8.04     0.0046
   (3 vs 1)  |          1        0.89     0.3447
   (4 vs 1)  |          1        3.71     0.0540
      Joint  |          3       70.37     0.0000
------------------------------------------------

--------------------------------------------------------------
             |            Delta-method
             |   Contrast   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
         _at |
   (2 vs 1)  |  -5.677457   2.002175     -9.601648   -1.753266
   (3 vs 1)  |   93.50914   98.96862     -100.4658    287.4841
   (4 vs 1)  |  -3.524207   1.828642      -7.10828    .0598662
--------------------------------------------------------------

.  
. margins, at(RESTRICT_COUNTdomlag1 = 0 RESTRICT_COUNTdomlag1_sq = 0 ) ///
>                  at(RESTRICT_COUNTdomlag1 = 1 RESTRICT_COUNTdomlag1_sq = 1 ) ///
>                  at(RESTRICT_COUNTdomlag1 = 2 RESTRICT_COUNTdomlag1_sq = 4 ) ///
>                  at(RESTRICT_COUNTdomlag1 = 3 RESTRICT_COUNTdomlag1_sq = 9 ) ///
>                  at(RESTRICT_COUNTdomlag1 = 4 RESTRICT_COUNTdomlag1_sq = 16 ) ///
>                  at(RESTRICT_COUNTdomlag1 = 5 RESTRICT_COUNTdomlag1_sq = 25 ) ///
>                  at(RESTRICT_COUNTdomlag1 = 6 RESTRICT_COUNTdomlag1_sq = 36 ) ///
>                  at(RESTRICT_COUNTdomlag1 = 7 RESTRICT_COUNTdomlag1_sq = 49 ) ///
>                  at(RESTRICT_COUNTdomlag1 = 8 RESTRICT_COUNTdomlag1_sq = 64 ) ///
>                  at(RESTRICT_COUNTdomlag1 = 9 RESTRICT_COUNTdomlag1_sq = 81 ) ///
>                  at(RESTRICT_COUNTdomlag1 = 10 RESTRICT_COUNTdomlag1_sq = 100 ) level(95) post

Predictive margins                              Number of obs     =      1,248
Model VCE    : Bootstrap

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           0
               RESTRIC~1_sq    =           0

2._at        : RESTRI~mlag1    =           1
               RESTRIC~1_sq    =           1

3._at        : RESTRI~mlag1    =           2
               RESTRIC~1_sq    =           4

4._at        : RESTRI~mlag1    =           3
               RESTRIC~1_sq    =           9

5._at        : RESTRI~mlag1    =           4
               RESTRIC~1_sq    =          16

6._at        : RESTRI~mlag1    =           5
               RESTRIC~1_sq    =          25

7._at        : RESTRI~mlag1    =           6
               RESTRIC~1_sq    =          36

8._at        : RESTRI~mlag1    =           7
               RESTRIC~1_sq    =          49

9._at        : RESTRI~mlag1    =           8
               RESTRIC~1_sq    =          64

10._at       : RESTRI~mlag1    =           9
               RESTRIC~1_sq    =          81

11._at       : RESTRI~mlag1    =          10
               RESTRIC~1_sq    =         100

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   .6860574   .1858533     3.69   0.000     .3217915    1.050323
          2  |    1.31511   .2196969     5.99   0.000     .8845124    1.745709
          3  |   2.240702   .3694476     6.07   0.000     1.516598    2.964806
          4  |   3.393328   .7416322     4.58   0.000     1.939756      4.8469
          5  |   4.567596   1.238713     3.69   0.000     2.139763    6.995429
          6  |    5.46474   1.691181     3.23   0.001     2.150085    8.779395
          7  |   5.811274   1.953821     2.97   0.003     1.981855    9.640693
          8  |   5.492793   1.990261     2.76   0.006     1.591954    9.393632
          9  |   4.614611    1.86777     2.47   0.013     .9538486    8.275374
         10  |   3.445855   1.657177     2.08   0.038     .1978473    6.693863
         11  |   2.287067   1.375407     1.66   0.096     -.408682    4.982816
------------------------------------------------------------------------------

. display _b[7._at] - _b[11._at]           // 3.5237687
3.5242071

. display _b[7._at] - _b[1._at]            // 4.8123955
5.1252168

. test _b[7._at] = _b[11._at]     

 ( 1)  7._at - 11._at = 0

           chi2(  1) =    3.71
         Prob > chi2 =    0.0540

. test _b[7._at] = _b[1._at]              

 ( 1)  - 1bn._at + 7._at = 0

           chi2(  1) =    6.04
         Prob > chi2 =    0.0140

. marginsplot, recast(line) recastci(rarea) level(95) ///
> yscale(range(0 10))  ylabel(0(2)10) ///
> plotopt(color(gs0) lwidth(1) ) ///
> ciopt(color(gs6) fintensity(10) lcolor(gs16) ) ///
> xlabel(1 "0" 2 "1" 3 "2" 4 "3" 5 "4" 6 "5" 7 "6" 8 "7" 9 "8" 10 "9" 11 "10") ///
> xtitle("Count of restriction types", size(large)) ///
> ytitle("Predicted number of UAs", size(large)) ///
> title("Model 5",size(large)) ///
> scheme(s1mono)

  Variables that uniquely identify margins: _atopt
  Multiple at() options specified:
      _atoption=1: RESTRICT_COUNTdomlag1 = 0 RESTRICT_COUNTdomlag1_sq = 0
      _atoption=2: RESTRICT_COUNTdomlag1 = 1 RESTRICT_COUNTdomlag1_sq = 1
      _atoption=3: RESTRICT_COUNTdomlag1 = 2 RESTRICT_COUNTdomlag1_sq = 4
      _atoption=4: RESTRICT_COUNTdomlag1 = 3 RESTRICT_COUNTdomlag1_sq = 9
      _atoption=5: RESTRICT_COUNTdomlag1 = 4 RESTRICT_COUNTdomlag1_sq = 16
      _atoption=6: RESTRICT_COUNTdomlag1 = 5 RESTRICT_COUNTdomlag1_sq = 25
      _atoption=7: RESTRICT_COUNTdomlag1 = 6 RESTRICT_COUNTdomlag1_sq = 36
      _atoption=8: RESTRICT_COUNTdomlag1 = 7 RESTRICT_COUNTdomlag1_sq = 49
      _atoption=9: RESTRICT_COUNTdomlag1 = 8 RESTRICT_COUNTdomlag1_sq = 64
      _atoption=10: RESTRICT_COUNTdomlag1 = 9 RESTRICT_COUNTdomlag1_sq = 81
      _atoption=11: RESTRICT_COUNTdomlag1 = 10 RESTRICT_COUNTdomlag1_sq = 100

. graph export ".\Figures\Manuscript_Figure3d.png", replace
(file .\Figures\Manuscript_Figure3d.png written in PNG format)

. 
. 
. 
. ****************************************************
. ****** Mechanism implications, Figures 4 and 5 *****
. ****************************************************
. 
. ********************
. *** Number of CSOs
. ********************
. 
. ** Table S9a
. 
. ** Model 1: Negative binomial with robust standard errors
. #delimit ;
delimiter now ;
. nbreg hrgroups c.RESTRICT_COUNTdomlag1##c.RESTRICT_COUNTdomlag1, vce(cluster cowcode) ;

Fitting Poisson model:

Iteration 0:   log pseudolikelihood = -27406.541  
Iteration 1:   log pseudolikelihood = -27406.257  
Iteration 2:   log pseudolikelihood = -27406.257  

Fitting constant-only model:

Iteration 0:   log pseudolikelihood = -8458.6402  
Iteration 1:   log pseudolikelihood = -8227.2079  
Iteration 2:   log pseudolikelihood = -8184.8316  
Iteration 3:   log pseudolikelihood = -8184.8274  
Iteration 4:   log pseudolikelihood = -8184.8274  

Fitting full model:

Iteration 0:   log pseudolikelihood = -8121.0579  
Iteration 1:   log pseudolikelihood = -8117.3464  
Iteration 2:   log pseudolikelihood = -8117.3252  
Iteration 3:   log pseudolikelihood = -8117.3252  

Negative binomial regression                    Number of obs     =      1,604
                                                Wald chi2(2)      =      35.73
Dispersion           = mean                     Prob > chi2       =     0.0000
Log pseudolikelihood = -8117.3252               Pseudo R2         =     0.0082

                                                                 (Std. Err. adjusted for 169 clusters in cowcode)
-----------------------------------------------------------------------------------------------------------------
                                                |               Robust
                                       hrgroups |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
------------------------------------------------+----------------------------------------------------------------
                          RESTRICT_COUNTdomlag1 |  -.0364981   .0395404    -0.92   0.356    -.1139959    .0409997
                                                |
c.RESTRICT_COUNTdomlag1#c.RESTRICT_COUNTdomlag1 |  -.0043845   .0040024    -1.10   0.273    -.0122291    .0034601
                                                |
                                          _cons |   4.353972   .0603212    72.18   0.000     4.235744    4.472199
------------------------------------------------+----------------------------------------------------------------
                                       /lnalpha |  -.9729645   .0733548                     -1.116737   -.8291917
------------------------------------------------+----------------------------------------------------------------
                                          alpha |   .3779609   .0277253                      .3273461    .4364019
-----------------------------------------------------------------------------------------------------------------

. #delimit cr
delimiter now cr
. 
. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |      1,604 -8184.827  -8117.325       4    16242.65   16264.17
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. mat es_ic = r(S)

. mat list es_ic

es_ic[1,6]
            N         ll0          ll          df         AIC         BIC
.        1604  -8184.8274  -8117.3252           4    16242.65   16264.171

. local AIC: display %4.1f es_ic[1,5]

. local BIC: display %4.1f es_ic[1,6]

. local LL: display %4.1f es_ic[1,3]

. outreg2 using ".\Tables\Appendix_TableS9a.doc", replace ///
>  ctitle("Model 1") label  eqdrop(lnalpha) dec(3) ///
> alpha(0.001, 0.01, 0.05, 0.1) symbol(***,**, *, +) ///
> addtext(Log-Likelihood, `LL', BIC, `BIC', AIC, `AIC')
.\Tables\Appendix_TableS9a.doc
dir : seeout

. 
. 
. 
. * Model 2: Negative binomial with robust se
. #delimit ;
delimiter now ;
. nbreg hrgroups c.RESTRICT_COUNTdomlag1##c.RESTRICT_COUNTdomlag1
> PTS_Slag1 hrnewslag1 
> protest_ClarkRegan_loglag1 UCDP_armedConflictlag1 
> PR_freedomHouselag1 PR_freedomHouselag1_sq 
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1, vce(cluster cowcode);

Fitting Poisson model:

Iteration 0:   log pseudolikelihood = -10724.952  
Iteration 1:   log pseudolikelihood = -10716.642  
Iteration 2:   log pseudolikelihood = -10716.641  

Fitting constant-only model:

Iteration 0:   log pseudolikelihood = -7386.7607  
Iteration 1:   log pseudolikelihood = -7161.8313  
Iteration 2:   log pseudolikelihood = -7105.0923  
Iteration 3:   log pseudolikelihood = -7105.0816  
Iteration 4:   log pseudolikelihood = -7105.0816  

Fitting full model:

Iteration 0:   log pseudolikelihood =  -6668.956  
Iteration 1:   log pseudolikelihood = -6394.3706  
Iteration 2:   log pseudolikelihood = -6367.1679  
Iteration 3:   log pseudolikelihood = -6365.9123  
Iteration 4:   log pseudolikelihood =  -6365.911  
Iteration 5:   log pseudolikelihood =  -6365.911  

Negative binomial regression                    Number of obs     =      1,391
                                                Wald chi2(13)     =     830.29
Dispersion           = mean                     Prob > chi2       =     0.0000
Log pseudolikelihood =  -6365.911               Pseudo R2         =     0.1040

                                                                 (Std. Err. adjusted for 147 clusters in cowcode)
-----------------------------------------------------------------------------------------------------------------
                                                |               Robust
                                       hrgroups |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
------------------------------------------------+----------------------------------------------------------------
                          RESTRICT_COUNTdomlag1 |   .0536744   .0265691     2.02   0.043        .0016    .1057488
                                                |
c.RESTRICT_COUNTdomlag1#c.RESTRICT_COUNTdomlag1 |  -.0060883   .0030671    -1.99   0.047    -.0120997   -.0000768
                                                |
                                      PTS_Slag1 |   .2047589   .0272688     7.51   0.000     .1513131    .2582047
                                     hrnewslag1 |  -.0183522   .0088733    -2.07   0.039    -.0357435   -.0009608
                     protest_ClarkRegan_loglag1 |   .0699316   .0187632     3.73   0.000     .0331564    .1067068
                         UCDP_armedConflictlag1 |  -.0084455   .0592423    -0.14   0.887    -.1245584    .1076673
                            PR_freedomHouselag1 |  -.0778019   .0680539    -1.14   0.253     -.211185    .0555812
                         PR_freedomHouselag1_sq |  -.0013369   .0075825    -0.18   0.860    -.0161983    .0135245
                      gdp_pc_constantUS2010lag1 |  -.2511285   .1031204    -2.44   0.015    -.4532407   -.0490163
                   gdp_pc_constantUS2010lag1_sq |   .0408797   .0189383     2.16   0.031     .0037613    .0779981
                                      KOFGIlag1 |  -.0155538    .011758    -1.32   0.186    -.0385991    .0074915
                                   KOFGIlag1_sq |   .0004731   .0001234     3.83   0.000     .0002313    .0007148
                                 populationlag1 |   .0669893    .040569     1.65   0.099    -.0125244    .1465031
                                          _cons |   3.100718   .2970911    10.44   0.000      2.51843    3.683006
------------------------------------------------+----------------------------------------------------------------
                                       /lnalpha |  -2.078376   .0708946                     -2.217327   -1.939425
------------------------------------------------+----------------------------------------------------------------
                                          alpha |   .1251332   .0088713                      .1088998    .1437866
-----------------------------------------------------------------------------------------------------------------

. #delimit cr
delimiter now cr
. 
. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |      1,391 -7105.082  -6365.911      15    12761.82   12840.39
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. mat es_ic = r(S)

. local AIC: display %4.1f es_ic[1,5]

. local BIC: display %4.1f es_ic[1,6]

. local LL: display %4.1f es_ic[1,3]

. outreg2 using ".\Tables\Appendix_TableS9a.doc", append ///
>  ctitle("Model 2") label  eqdrop(lnalpha) dec(3) ///
> alpha(0.001, 0.01, 0.05, 0.1) symbol(***,**, *, +) ///
> addtext(Log-Likelihood, `LL', BIC, `BIC', AIC, `AIC')
.\Tables\Appendix_TableS9a.doc
dir : seeout

. 
. 
. ** Main Manuscript: Figure S4
. margins, at(RESTRICT_COUNTdomlag1 = (0(1)10) ) post

Predictive margins                              Number of obs     =      1,391
Model VCE    : Robust

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           0

2._at        : RESTRI~mlag1    =           1

3._at        : RESTRI~mlag1    =           2

4._at        : RESTRI~mlag1    =           3

5._at        : RESTRI~mlag1    =           4

6._at        : RESTRI~mlag1    =           5

7._at        : RESTRI~mlag1    =           6

8._at        : RESTRI~mlag1    =           7

9._at        : RESTRI~mlag1    =           8

10._at       : RESTRI~mlag1    =           9

11._at       : RESTRI~mlag1    =          10

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   71.86333   1.829704    39.28   0.000     68.27718    75.44948
          2  |    75.3657    1.93392    38.97   0.000     71.57529    79.15611
          3  |   78.08218   2.937476    26.58   0.000     72.32483    83.83953
          4  |    79.9175   3.871599    20.64   0.000     72.32931     87.5057
          5  |   80.80602   4.504364    17.94   0.000     71.97762    89.63441
          6  |   80.71556   4.826824    16.72   0.000     71.25516    90.17596
          7  |   79.64943   4.947792    16.10   0.000     69.95193    89.34692
          8  |   77.64613   5.083778    15.27   0.000     67.68211    87.61015
          9  |   74.77713   5.503613    13.59   0.000     63.99025    85.56402
         10  |   71.14257   6.375985    11.16   0.000     58.64587    83.63927
         11  |   66.86551    7.66509     8.72   0.000     51.84221    81.88881
------------------------------------------------------------------------------

. marginsplot, recast(line) recastci(rarea)  ///
> plotopt(color(gs0) lwidth(1) ) ///
> ciopt(color(gs6) fintensity(10) lcolor(gs16) ) ///
> xtitle("Count of restriction types", size(large)) ///
> ytitle("Predicted number of human rights groups", size(large)) ///
> title("Number of CSOs", size(large)) subtitle("-- Negative Binomial --", size(large)) ///
> scheme(s1mono)

  Variables that uniquely identify margins: RESTRICT_COUNTdomlag1

. graph export ".\Figures\Manuscript_Figure4.png", replace
(file .\Figures\Manuscript_Figure4.png written in PNG format)

. 
. 
. ** Model 3
.  
. * Test: Poisson with bootstrapped SE (to compare to GMM-estimated model parameter estimates)
. xtset, clear

. capture drop vhat*

. #delimit ;
delimiter now ;
. poisson hrgroups c.RESTRICT_COUNTdomlag1##c.RESTRICT_COUNTdomlag1
> PTS_Slag1 hrnewslag1 
> protest_ClarkRegan_loglag1 UCDP_armedConflictlag1 
> PR_freedomHouselag1 PR_freedomHouselag1_sq 
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1, vce(boot, reps(20) cl(cowcode));
(running poisson on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Poisson regression                              Number of obs     =      1,391
                                                Replications      =         20
                                                Wald chi2(13)     =    1150.42
                                                Prob > chi2       =     0.0000
Log likelihood = -10716.641                     Pseudo R2         =     0.5597

                                                                  (Replications based on 147 clusters in cowcode)
-----------------------------------------------------------------------------------------------------------------
                                                |   Observed   Bootstrap                         Normal-based
                                       hrgroups |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
------------------------------------------------+----------------------------------------------------------------
                          RESTRICT_COUNTdomlag1 |   .0456149   .0272989     1.67   0.095    -.0078899    .0991197
                                                |
c.RESTRICT_COUNTdomlag1#c.RESTRICT_COUNTdomlag1 |  -.0053908   .0022667    -2.38   0.017    -.0098334   -.0009482
                                                |
                                      PTS_Slag1 |    .224007   .0286506     7.82   0.000     .1678529     .280161
                                     hrnewslag1 |  -.0283699   .0090507    -3.13   0.002     -.046109   -.0106308
                     protest_ClarkRegan_loglag1 |   .0712375   .0164888     4.32   0.000     .0389201     .103555
                         UCDP_armedConflictlag1 |    .010642    .074984     0.14   0.887    -.1363239    .1576078
                            PR_freedomHouselag1 |  -.0988144   .0731403    -1.35   0.177    -.2421668     .044538
                         PR_freedomHouselag1_sq |   .0006026   .0085993     0.07   0.944    -.0162517     .017457
                      gdp_pc_constantUS2010lag1 |  -.1383964   .1159991    -1.19   0.233    -.3657504    .0889576
                   gdp_pc_constantUS2010lag1_sq |   .0210183   .0230067     0.91   0.361     -.024074    .0661107
                                      KOFGIlag1 |  -.0176419   .0149709    -1.18   0.239    -.0469844    .0117006
                                   KOFGIlag1_sq |   .0004541   .0001537     2.96   0.003     .0001529    .0007553
                                 populationlag1 |   .0554716   .0262196     2.12   0.034     .0040821    .1068612
                                          _cons |   3.303222   .3388976     9.75   0.000     2.638995    3.967449
-----------------------------------------------------------------------------------------------------------------

. #delimit cr
delimiter now cr
. 
. * Endogeneity
. capture drop vhat*

. #delimit ;
delimiter now ;
. reg RESTRICT_COUNTdomlag1 gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 RESTRICT_COUNTdomlag2 RESTRICT_COUNTdomlag3, vce(boot, reps(20) cl(cowcode)) ;
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      1,778
                                                Replications      =         20
                                                Wald chi2(7)      =    2577.53
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.6408
                                                Adj R-squared     =     0.6394
                                                Root MSE          =     1.5728

                                               (Replications based on 164 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
       RESTRICT_COUNTdomlag1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
   gdp_pc_constantUS2010lag1 |   .2463196   .1443057     1.71   0.088    -.0365143    .5291536
gdp_pc_constantUS2010lag1_sq |  -.0332097   .0261492    -1.27   0.204    -.0844611    .0180417
                   KOFGIlag1 |    .011456   .0169561     0.68   0.499    -.0217773    .0446893
                KOFGIlag1_sq |  -.0003353   .0002002    -1.67   0.094    -.0007278    .0000571
              populationlag1 |  -.1394559   .0645798    -2.16   0.031    -.2660301   -.0128818
       RESTRICT_COUNTdomlag2 |   .6642655   .0574899    11.55   0.000     .5515874    .7769436
       RESTRICT_COUNTdomlag3 |   .1641477    .067332     2.44   0.015     .0321793     .296116
                       _cons |   .8740714    .356938     2.45   0.014     .1744858    1.573657
----------------------------------------------------------------------------------------------

. predict vhat1, resid ;
(1,104 missing values generated)

. reg RESTRICT_COUNTdomlag1_sq gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 RESTRICT_COUNTdomlag2_sq RESTRICT_COUNTdomlag3_sq, vce(boot, reps(20) cl(cowcode)) ;
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      1,778
                                                Replications      =         20
                                                Wald chi2(7)      =    1429.63
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.6152
                                                Adj R-squared     =     0.6137
                                                Root MSE          =    14.9598

                                               (Replications based on 164 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
    RESTRICT_COUNTdomlag1_sq |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
   gdp_pc_constantUS2010lag1 |   2.749623   1.359356     2.02   0.043     .0853343    5.413911
gdp_pc_constantUS2010lag1_sq |  -.4086929   .3568206    -1.15   0.252    -1.108048    .2906626
                   KOFGIlag1 |   .0413554   .1807896     0.23   0.819    -.3129856    .3956965
                KOFGIlag1_sq |  -.0025526   .0016931    -1.51   0.132    -.0058711    .0007659
              populationlag1 |  -1.482737   .8833732    -1.68   0.093    -3.214117    .2486423
    RESTRICT_COUNTdomlag2_sq |    .672295   .0849178     7.92   0.000     .5058592    .8387308
    RESTRICT_COUNTdomlag3_sq |   .1396389   .0711844     1.96   0.050       .00012    .2791578
                       _cons |   9.017048    5.26261     1.71   0.087    -1.297479    19.33157
----------------------------------------------------------------------------------------------

. predict vhat2, resid ;
(1,104 missing values generated)

. poisson hrgroups RESTRICT_COUNTdomlag1 RESTRICT_COUNTdomlag1_sq
> PTS_Slag1 hrgroupslag1 hrnewslag1 
> protest_ClarkRegan_loglag1 UCDP_armedConflictlag1 
> PR_freedomHouselag1 PR_freedomHouselag1_sq 
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 vhat1 vhat2, vce(boot, reps(20) cl(cowcode)) ;
(running poisson on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Poisson regression                              Number of obs     =      1,247
                                                Replications      =         20
                                                Wald chi2(16)     =    8545.59
                                                Prob > chi2       =     0.0000
Log likelihood = -6686.2809                     Pseudo R2         =     0.6983

                                               (Replications based on 147 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
                    hrgroups |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
       RESTRICT_COUNTdomlag1 |   .0643282   .0176102     3.65   0.000     .0298128    .0988435
    RESTRICT_COUNTdomlag1_sq |  -.0080514   .0019005    -4.24   0.000    -.0117763   -.0043266
                   PTS_Slag1 |   .0801718   .0136099     5.89   0.000      .053497    .1068467
                hrgroupslag1 |   .0066698   .0004499    14.83   0.000      .005788    .0075516
                  hrnewslag1 |  -.0180716   .0061423    -2.94   0.003    -.0301102   -.0060329
  protest_ClarkRegan_loglag1 |   .0081997   .0109332     0.75   0.453     -.013229    .0296284
      UCDP_armedConflictlag1 |     .03511   .0352235     1.00   0.319    -.0339268    .1041468
         PR_freedomHouselag1 |  -.0476985   .0266648    -1.79   0.074    -.0999605    .0045635
      PR_freedomHouselag1_sq |   .0005018   .0035214     0.14   0.887    -.0063999    .0074036
   gdp_pc_constantUS2010lag1 |  -.1560395   .0509588    -3.06   0.002    -.2559169   -.0561621
gdp_pc_constantUS2010lag1_sq |   .0299975   .0092761     3.23   0.001     .0118166    .0481784
                   KOFGIlag1 |   .0162935   .0074662     2.18   0.029     .0016601    .0309269
                KOFGIlag1_sq |   3.67e-06    .000074     0.05   0.960    -.0001413    .0001487
              populationlag1 |   .0022793   .0171205     0.13   0.894    -.0312764    .0358349
                       vhat1 |  -.0570188   .0173206    -3.29   0.001    -.0909665   -.0230711
                       vhat2 |   .0058468   .0018048     3.24   0.001     .0023094    .0093843
                       _cons |   2.679785   .2000617    13.39   0.000     2.287672    3.071899
----------------------------------------------------------------------------------------------

. test vhat1 vhat2 ;

 ( 1)  [hrgroups]vhat1 = 0
 ( 2)  [hrgroups]vhat2 = 0

           chi2(  2) =   11.27
         Prob > chi2 =    0.0036

. test vhat1 ;

 ( 1)  [hrgroups]vhat1 = 0

           chi2(  1) =   10.84
         Prob > chi2 =    0.0010

. test vhat2 ;

 ( 1)  [hrgroups]vhat2 = 0

           chi2(  1) =   10.49
         Prob > chi2 =    0.0012

. #delimit cr
delimiter now cr
. 
. ** GMM (with 2 EEVs)
. xtset, clear

. #delimit ;
delimiter now ;
. ivpoisson gmm hrgroups
> PTS_Slag1  hrnewslag1 
> protest_ClarkRegan_loglag1 UCDP_armedConflictlag1 
> PR_freedomHouselag1 PR_freedomHouselag1_sq 
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1
> ( RESTRICT_COUNTdomlag1 RESTRICT_COUNTdomlag1_sq = 
>         RESTRICT_COUNTdomlag2 RESTRICT_COUNTdomlag3
>         RESTRICT_COUNTdomlag2_sq)
>         , twostep vce(boot, reps(50) cl(cowcode) seed(1)) ;
(running ivpoisson on estimation sample)

Bootstrap replications (50)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50

Exponential mean model with endogenous regressors

Number of parameters =  14                         Number of obs  =      1,389
Number of moments    =  15
Initial weight matrix: Unadjusted
GMM weight matrix:     Robust

                                               (Replications based on 147 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
                    hrgroups |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
       RESTRICT_COUNTdomlag1 |   .0702078   .0409789     1.71   0.087    -.0101095     .150525
    RESTRICT_COUNTdomlag1_sq |   -.008126   .0047129    -1.72   0.085    -.0173632    .0011112
                   PTS_Slag1 |   .2206251   .0261624     8.43   0.000     .1693478    .2719024
                  hrnewslag1 |  -.0289122   .0119875    -2.41   0.016    -.0524073   -.0054172
  protest_ClarkRegan_loglag1 |   .0701628   .0207721     3.38   0.001     .0294503    .1108753
      UCDP_armedConflictlag1 |  -.0015201    .065113    -0.02   0.981    -.1291392    .1260991
         PR_freedomHouselag1 |  -.1135711   .0577107    -1.97   0.049     -.226682   -.0004602
      PR_freedomHouselag1_sq |   .0021883   .0069282     0.32   0.752    -.0113907    .0157674
   gdp_pc_constantUS2010lag1 |  -.1364666   .0984983    -1.39   0.166    -.3295198    .0565866
gdp_pc_constantUS2010lag1_sq |   .0206013   .0207536     0.99   0.321     -.020075    .0612776
                   KOFGIlag1 |  -.0183111   .0115991    -1.58   0.114    -.0410449    .0044228
                KOFGIlag1_sq |   .0004579   .0001116     4.10   0.000     .0002391    .0006767
              populationlag1 |   .0558722   .0486865     1.15   0.251    -.0395517     .151296
                       _cons |   3.349321   .3294114    10.17   0.000     2.703687    3.994956
----------------------------------------------------------------------------------------------
Instrumented:  RESTRICT_COUNTdomlag1 RESTRICT_COUNTdomlag1_sq
Instruments:   PTS_Slag1 hrnewslag1 protest_ClarkRegan_loglag1 UCDP_armedConflictlag1
               PR_freedomHouselag1 PR_freedomHouselag1_sq gdp_pc_constantUS2010lag1
               gdp_pc_constantUS2010lag1_sq KOFGIlag1 KOFGIlag1_sq populationlag1
               RESTRICT_COUNTdomlag2 RESTRICT_COUNTdomlag3 RESTRICT_COUNTdomlag2_sq

. #delimit cr
delimiter now cr
. estat overid

  Test of overidentifying restriction:

  Hansen's J chi2(1) = .357915 (p = 0.5497)

. 
. mat es_ic = r(J) 

. matrix list es_ic

symmetric es_ic[1,1]
           c1
r1  .35791482

. local J: display %4.1f es_ic[1,1]

. outreg2 using ".\Tables\Appendix_TableS9a.doc", append ///
>  ctitle("Model 3") label  eqdrop(lnalpha) dec(3) ///
> alpha(0.001, 0.01, 0.05, 0.1) symbol(***,**, *, +) ///
> addtext(Hansen's J, `J')
.\Tables\Appendix_TableS9a.doc
dir : seeout

. 
. margins, at(RESTRICT_COUNTdomlag1 = 0 RESTRICT_COUNTdomlag1_sq = 0 ) ///
>                          at(RESTRICT_COUNTdomlag1 = 1 RESTRICT_COUNTdomlag1_sq = 1 ) ///
>                          at(RESTRICT_COUNTdomlag1 = 2 RESTRICT_COUNTdomlag1_sq = 4 ) ///
>                          at(RESTRICT_COUNTdomlag1 = 3 RESTRICT_COUNTdomlag1_sq = 9 ) ///
>                          at(RESTRICT_COUNTdomlag1 = 4 RESTRICT_COUNTdomlag1_sq = 16 ) ///
>                          at(RESTRICT_COUNTdomlag1 = 5 RESTRICT_COUNTdomlag1_sq = 25 ) ///
>                          at(RESTRICT_COUNTdomlag1 = 6 RESTRICT_COUNTdomlag1_sq = 36 ) ///
>                          at(RESTRICT_COUNTdomlag1 = 7 RESTRICT_COUNTdomlag1_sq = 49 ) ///
>                          at(RESTRICT_COUNTdomlag1 = 8 RESTRICT_COUNTdomlag1_sq = 64 ) ///
>                          at(RESTRICT_COUNTdomlag1 = 9 RESTRICT_COUNTdomlag1_sq = 81 ) ///
>                          at(RESTRICT_COUNTdomlag1 = 10 RESTRICT_COUNTdomlag1_sq = 100 ) post

Predictive margins                              Number of obs     =      1,389
Model VCE    : Bootstrap

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           0
               RESTRIC~1_sq    =           0

2._at        : RESTRI~mlag1    =           1
               RESTRIC~1_sq    =           1

3._at        : RESTRI~mlag1    =           2
               RESTRIC~1_sq    =           4

4._at        : RESTRI~mlag1    =           3
               RESTRIC~1_sq    =           9

5._at        : RESTRI~mlag1    =           4
               RESTRIC~1_sq    =          16

6._at        : RESTRI~mlag1    =           5
               RESTRIC~1_sq    =          25

7._at        : RESTRI~mlag1    =           6
               RESTRIC~1_sq    =          36

8._at        : RESTRI~mlag1    =           7
               RESTRIC~1_sq    =          49

9._at        : RESTRI~mlag1    =           8
               RESTRIC~1_sq    =          64

10._at       : RESTRI~mlag1    =           9
               RESTRIC~1_sq    =          81

11._at       : RESTRI~mlag1    =          10
               RESTRIC~1_sq    =         100

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |    71.3762   2.286931    31.21   0.000     66.89389     75.8585
          2  |   75.94779   2.012001    37.75   0.000     72.00434    79.89124
          3  |   79.50945   3.792806    20.96   0.000     72.07568    86.94321
          4  |   81.89627   5.435434    15.07   0.000     71.24302    92.54953
          5  |   82.99489   6.577218    12.62   0.000     70.10378      95.886
          6  |   82.75237   7.226054    11.45   0.000     68.58956    96.91517
          7  |   81.18043   7.570053    10.72   0.000     66.34339    96.01746
          8  |   78.35452   7.944892     9.86   0.000     62.78282    93.92622
          9  |   74.40782   8.710796     8.54   0.000     57.33498    91.48067
         10  |   69.52083    10.0318     6.93   0.000     49.85887     89.1828
         11  |    63.9077   11.78779     5.42   0.000     40.80405    87.01134
------------------------------------------------------------------------------

. 
. marginsplot, recast(line) recastci(rarea)  ///
> plotopt(color(gs0) lwidth(1) ) ///
> ciopt(color(gs6) fintensity(10) lcolor(gs16) ) ///
> xlabel(1 "0" 2 "1" 3 "2" 4 "3" 5 "4" 6 "5" 7 "6" 8 "7" 9 "8" 10 "9" 11 "10") ///
> xtitle("Count of restriction types",size(large)) ///
> ytitle("Predicted number of human rights groups",size(large)) ///
> title("Number of CSOs", size(large)) subtitle("-- Poisson with GMM --", size(large)) ///
> scheme(s1mono)

  Variables that uniquely identify margins: _atopt
  Multiple at() options specified:
      _atoption=1: RESTRICT_COUNTdomlag1 = 0 RESTRICT_COUNTdomlag1_sq = 0
      _atoption=2: RESTRICT_COUNTdomlag1 = 1 RESTRICT_COUNTdomlag1_sq = 1
      _atoption=3: RESTRICT_COUNTdomlag1 = 2 RESTRICT_COUNTdomlag1_sq = 4
      _atoption=4: RESTRICT_COUNTdomlag1 = 3 RESTRICT_COUNTdomlag1_sq = 9
      _atoption=5: RESTRICT_COUNTdomlag1 = 4 RESTRICT_COUNTdomlag1_sq = 16
      _atoption=6: RESTRICT_COUNTdomlag1 = 5 RESTRICT_COUNTdomlag1_sq = 25
      _atoption=7: RESTRICT_COUNTdomlag1 = 6 RESTRICT_COUNTdomlag1_sq = 36
      _atoption=8: RESTRICT_COUNTdomlag1 = 7 RESTRICT_COUNTdomlag1_sq = 49
      _atoption=9: RESTRICT_COUNTdomlag1 = 8 RESTRICT_COUNTdomlag1_sq = 64
      _atoption=10: RESTRICT_COUNTdomlag1 = 9 RESTRICT_COUNTdomlag1_sq = 81
      _atoption=11: RESTRICT_COUNTdomlag1 = 10 RESTRICT_COUNTdomlag1_sq = 100

. graph export ".\Figures\Appendix_FigureS9a_1.png", replace
(file .\Figures\Appendix_FigureS9a_1.png written in PNG format)

. 
. 
. 
. ** Model 4: GMM with all endogenous explanatory variables
. 
. * Test of endogeneity
. capture drop vhat3

. capture drop vhat4

. capture drop vhat5

. capture drop vhat6

. capture drop vhat7

. capture drop vhat8

. capture drop vhat9

. #delimit ;
delimiter now ;
. reg PTS_Slag1 gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 PTS_Slag2, vce(boot, reps(20) cl(cowcode)) ;
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      2,279
                                                Replications      =         20
                                                Wald chi2(6)      =   11061.86
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.7616
                                                Adj R-squared     =     0.7610
                                                Root MSE          =     0.5690

                                               (Replications based on 169 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
                   PTS_Slag1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
   gdp_pc_constantUS2010lag1 |  -.1510194   .0223336    -6.76   0.000    -.1947926   -.1072463
gdp_pc_constantUS2010lag1_sq |   .0262482   .0066308     3.96   0.000     .0132521    .0392442
                   KOFGIlag1 |  -.0039297   .0081001    -0.49   0.628    -.0198056    .0119462
                KOFGIlag1_sq |   .0000394   .0000652     0.60   0.546    -.0000885    .0001672
              populationlag1 |   .0417515   .0190687     2.19   0.029     .0043775    .0791255
                   PTS_Slag2 |   .8060869   .0157101    51.31   0.000     .7752957    .8368781
                       _cons |   .5310227   .2346736     2.26   0.024     .0710709    .9909744
----------------------------------------------------------------------------------------------

. predict vhat3, resid ;
(603 missing values generated)

. reg hrnewslag1 gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 hrnewslag2, vce(boot, reps(20) cl(cowcode)) ;
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      1,573
                                                Replications      =         20
                                                Wald chi2(6)      =     281.83
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.3967
                                                Adj R-squared     =     0.3944
                                                Root MSE          =     0.8839

                                               (Replications based on 178 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
                  hrnewslag1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
   gdp_pc_constantUS2010lag1 |  -.0249602   .0347151    -0.72   0.472    -.0930006    .0430802
gdp_pc_constantUS2010lag1_sq |   .0002959   .0080496     0.04   0.971    -.0154811    .0160728
                   KOFGIlag1 |    .008712   .0076235     1.14   0.253    -.0062298    .0236538
                KOFGIlag1_sq |  -.0000775   .0000675    -1.15   0.251    -.0002099    .0000549
              populationlag1 |   -.028404    .042333    -0.67   0.502    -.1113751    .0545671
                  hrnewslag2 |   .5476436   .0434702    12.60   0.000     .4624435    .6328436
                       _cons |  -.0814538   .2305513    -0.35   0.724    -.5333261    .3704184
----------------------------------------------------------------------------------------------

. predict vhat5, resid ;
(1,309 missing values generated)

. reg protest_ClarkRegan_loglag1 gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 protest_ClarkRegan_loglag2, vce(boot, reps(20) cl(cowcode)) ;
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      2,071
                                                Replications      =         20
                                                Wald chi2(6)      =     390.38
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.3691
                                                Adj R-squared     =     0.3673
                                                Root MSE          =     0.7051

                                               (Replications based on 152 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
  protest_ClarkRegan_loglag1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
   gdp_pc_constantUS2010lag1 |  -.0654719   .0756012    -0.87   0.386    -.2136476    .0827038
gdp_pc_constantUS2010lag1_sq |  -.0109781   .0192769    -0.57   0.569    -.0487601    .0268038
                   KOFGIlag1 |   .0119496   .0103474     1.15   0.248    -.0083309    .0322301
                KOFGIlag1_sq |  -.0000803   .0000943    -0.85   0.395    -.0002652    .0001046
              populationlag1 |  -.0393505   .0258143    -1.52   0.127    -.0899455    .0112446
  protest_ClarkRegan_loglag2 |   .5800565   .0372218    15.58   0.000     .5071032    .6530099
                       _cons |   .0000661   .2849982     0.00   1.000    -.5585201    .5586523
----------------------------------------------------------------------------------------------

. predict vhat6, resid ;
(811 missing values generated)

. reg UCDP_armedConflictlag1 gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 UCDP_armedConflictlag2, vce(boot, reps(20) cl(cowcode)) ;
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      2,244
                                                Replications      =         20
                                                Wald chi2(6)      =     765.80
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.6218
                                                Adj R-squared     =     0.6207
                                                Root MSE          =     0.2273

                                               (Replications based on 165 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
      UCDP_armedConflictlag1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
   gdp_pc_constantUS2010lag1 |  -.0098038   .0135351    -0.72   0.469    -.0363322    .0167246
gdp_pc_constantUS2010lag1_sq |   .0011061   .0039555     0.28   0.780    -.0066466    .0088589
                   KOFGIlag1 |  -.0059281   .0025863    -2.29   0.022    -.0109971   -.0008592
                KOFGIlag1_sq |    .000045   .0000205     2.20   0.028     4.87e-06    .0000852
              populationlag1 |   .0033715   .0080185     0.42   0.674    -.0123444    .0190874
      UCDP_armedConflictlag2 |   .7583442   .0468022    16.20   0.000     .6666136    .8500748
                       _cons |   .2122195   .0773168     2.74   0.006     .0606813    .3637577
----------------------------------------------------------------------------------------------

. predict vhat7, resid ;
(638 missing values generated)

. reg PR_freedomHouselag1 gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 PR_freedomHouselag2, vce(boot, reps(20) cl(cowcode)) ;
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      2,392
                                                Replications      =         20
                                                Wald chi2(6)      =   38801.09
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.9424
                                                Adj R-squared     =     0.9423
                                                Root MSE          =     0.5194

                                               (Replications based on 176 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
         PR_freedomHouselag1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
   gdp_pc_constantUS2010lag1 |    .018762   .0262496     0.71   0.475    -.0326863    .0702104
gdp_pc_constantUS2010lag1_sq |  -.0009895   .0087182    -0.11   0.910    -.0180769    .0160979
                   KOFGIlag1 |  -.0055951   .0049181    -1.14   0.255    -.0152344    .0040443
                KOFGIlag1_sq |   .0000103   .0000435     0.24   0.813     -.000075    .0000956
              populationlag1 |   -.000544   .0225592    -0.02   0.981    -.0447591    .0436712
         PR_freedomHouselag2 |   .9538828   .0086033   110.87   0.000     .9370208    .9707449
                       _cons |    .411751   .1386781     2.97   0.003     .1399469    .6835551
----------------------------------------------------------------------------------------------

. predict vhat8, resid ;
(490 missing values generated)

. reg PR_freedomHouselag1_sq gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 PR_freedomHouselag2_sq, vce(boot, reps(20) cl(cowcode)) ;
(running regress on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Linear regression                               Number of obs     =      2,392
                                                Replications      =         20
                                                Wald chi2(6)      =   25611.78
                                                Prob > chi2       =     0.0000
                                                R-squared         =     0.9246
                                                Adj R-squared     =     0.9244
                                                Root MSE          =     4.6144

                                               (Replications based on 176 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
      PR_freedomHouselag1_sq |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
   gdp_pc_constantUS2010lag1 |   .1758036   .2713036     0.65   0.517    -.3559417    .7075489
gdp_pc_constantUS2010lag1_sq |  -.0172909   .0742175    -0.23   0.816    -.1627545    .1281728
                   KOFGIlag1 |  -.0596632    .046606    -1.28   0.200    -.1510092    .0316829
                KOFGIlag1_sq |   .0001652   .0003856     0.43   0.668    -.0005906     .000921
              populationlag1 |  -.1340947   .1982261    -0.68   0.499    -.5226107    .2544213
      PR_freedomHouselag2_sq |   .9452816   .0114703    82.41   0.000     .9228003     .967763
                       _cons |   3.500302   1.460409     2.40   0.017     .6379526    6.362652
----------------------------------------------------------------------------------------------

. predict vhat9, resid ;
(490 missing values generated)

. poisson hrgroups gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1 
> RESTRICT_COUNTdomlag2 RESTRICT_COUNTdomlag2_sq
> PTS_Slag2 hrnewslag2 
> protest_ClarkRegan_loglag2 UCDP_armedConflictlag2 
> PR_freedomHouselag2 PR_freedomHouselag2_sq 
> vhat*, vce(boot, reps(20) cl(cowcode)) ;
(running poisson on estimation sample)

Bootstrap replications (20)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
....................

Poisson regression                              Number of obs     =      1,274
                                                Replications      =         20
                                                Wald chi2(19)     =          .
                                                Prob > chi2       =          .
Log likelihood = -9856.4361                     Pseudo R2         =     0.5682

                                               (Replications based on 147 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
                    hrgroups |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
   gdp_pc_constantUS2010lag1 |  -.1466981   .1109064    -1.32   0.186    -.3640707    .0706745
gdp_pc_constantUS2010lag1_sq |   .0220785   .0245015     0.90   0.368    -.0259437    .0701006
                   KOFGIlag1 |  -.0189771   .0119883    -1.58   0.113    -.0424738    .0045196
                KOFGIlag1_sq |   .0004719    .000118     4.00   0.000     .0002406    .0007032
              populationlag1 |   .0646199   .0458349     1.41   0.159    -.0252149    .1544548
       RESTRICT_COUNTdomlag2 |   .0454565   .0343418     1.32   0.186    -.0218522    .1127653
    RESTRICT_COUNTdomlag2_sq |  -.0052529   .0035838    -1.47   0.143     -.012277    .0017711
                   PTS_Slag2 |   .2356996   .0230558    10.22   0.000      .190511    .2808881
                  hrnewslag2 |  -.0314493   .0116429    -2.70   0.007     -.054269   -.0086296
  protest_ClarkRegan_loglag2 |   .0553042   .0178838     3.09   0.002     .0202526    .0903558
      UCDP_armedConflictlag2 |  -.0206525   .0801765    -0.26   0.797    -.1777955    .1364905
         PR_freedomHouselag2 |  -.1035343   .0719266    -1.44   0.150    -.2445078    .0374392
      PR_freedomHouselag2_sq |   .0007414   .0076391     0.10   0.923     -.014231    .0157138
                       vhat1 |  -.0011465   .0203702    -0.06   0.955    -.0410713    .0387782
                       vhat2 |  -.0006833    .002134    -0.32   0.749    -.0048658    .0034992
                       vhat3 |    .157714   .0191849     8.22   0.000     .1201123    .1953157
                       vhat5 |  -.0261324   .0117076    -2.23   0.026     -.049079   -.0031859
                       vhat6 |   .0488318   .0133058     3.67   0.000     .0227529    .0749108
                       vhat7 |   -.018645   .0533326    -0.35   0.727    -.1231749    .0858849
                       vhat8 |  -.0813882   .0527917    -1.54   0.123    -.1848581    .0220816
                       vhat9 |   .0055151   .0060911     0.91   0.365    -.0064233    .0174535
                       _cons |   3.323103   .3601573     9.23   0.000     2.617207    4.028998
----------------------------------------------------------------------------------------------

. test vhat1 vhat2 vhat3 vhat5 vhat6 vhat7 vhat8 vhat9 ;

 ( 1)  [hrgroups]vhat1 = 0
 ( 2)  [hrgroups]vhat2 = 0
 ( 3)  [hrgroups]vhat3 = 0
 ( 4)  [hrgroups]vhat5 = 0
 ( 5)  [hrgroups]vhat6 = 0
 ( 6)  [hrgroups]vhat7 = 0
 ( 7)  [hrgroups]vhat8 = 0
 ( 8)  [hrgroups]vhat9 = 0

           chi2(  8) =  274.67
         Prob > chi2 =    0.0000

. test vhat1 ;

 ( 1)  [hrgroups]vhat1 = 0

           chi2(  1) =    0.00
         Prob > chi2 =    0.9551

.  // Restrictions
> test vhat2 ;

 ( 1)  [hrgroups]vhat2 = 0

           chi2(  1) =    0.10
         Prob > chi2 =    0.7488

.  // Restrictions_sq
> test vhat3 ;

 ( 1)  [hrgroups]vhat3 = 0

           chi2(  1) =   67.58
         Prob > chi2 =    0.0000

.  // PTS SIGNIFICANT
> test vhat5 ;

 ( 1)  [hrgroups]vhat5 = 0

           chi2(  1) =    4.98
         Prob > chi2 =    0.0256

.  // hrnewslag1 SIGNIFICANT
> test vhat6 ;

 ( 1)  [hrgroups]vhat6 = 0

           chi2(  1) =   13.47
         Prob > chi2 =    0.0002

.  // protest_ClarkRegan_loglag2 SIGNIFICANT
> test vhat7 ;

 ( 1)  [hrgroups]vhat7 = 0

           chi2(  1) =    0.12
         Prob > chi2 =    0.7266

.  // UCDP_armedConflict n.s.
> test vhat8 ;

 ( 1)  [hrgroups]vhat8 = 0

           chi2(  1) =    2.38
         Prob > chi2 =    0.1231

.  // PR_freedomHouselag1 n.s.
> test vhat9 ;

 ( 1)  [hrgroups]vhat9 = 0

           chi2(  1) =    0.82
         Prob > chi2 =    0.3652

.  // PR_freedomHouselag1_sq n.s.
> #delimit cr
delimiter now cr
. 
. 
. xtset, clear

. #delimit ;
delimiter now ;
. ivpoisson gmm hrgroupslag1
> PR_freedomHouselag1 PR_freedomHouselag1_sq
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq 
> populationlag1  UCDP_armedConflictlag1 
> (RESTRICT_COUNTdomlag1 RESTRICT_COUNTdomlag1_sq 
> PTS_Slag1  hrnewslag1 
> protest_ClarkRegan_loglag1 = 
>         RESTRICT_COUNTdomlag2 RESTRICT_COUNTdomlag3
>         RESTRICT_COUNTdomlag2_sq
>         PTS_Slag2 PTS_Slag3 
>         hrnewslag2
>         protest_ClarkRegan_loglag2)
> , twostep vce(boot, reps(50) cl(cowcode) seed(2)) ;
(running ivpoisson on estimation sample)

Bootstrap replications (50)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50

Exponential mean model with endogenous regressors

Number of parameters =  14                         Number of obs  =      1,246
Number of moments    =  16
Initial weight matrix: Unadjusted
GMM weight matrix:     Robust

                                               (Replications based on 147 clusters in cowcode)
----------------------------------------------------------------------------------------------
                             |   Observed   Bootstrap                         Normal-based
                hrgroupslag1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
       RESTRICT_COUNTdomlag1 |   .0481906   .0400331     1.20   0.229    -.0302728     .126654
    RESTRICT_COUNTdomlag1_sq |  -.0068797   .0048078    -1.43   0.152    -.0163027    .0025433
                   PTS_Slag1 |   .3450672   .0472584     7.30   0.000     .2524425    .4376919
                  hrnewslag1 |  -.0703928    .044248    -1.59   0.112    -.1571172    .0163316
  protest_ClarkRegan_loglag1 |   .0739949   .0338228     2.19   0.029     .0077033    .1402865
         PR_freedomHouselag1 |  -.1403373   .0633371    -2.22   0.027    -.2644757    -.016199
      PR_freedomHouselag1_sq |   .0047465   .0072115     0.66   0.510    -.0093878    .0188808
   gdp_pc_constantUS2010lag1 |  -.0672231   .1030951    -0.65   0.514    -.2692858    .1348396
gdp_pc_constantUS2010lag1_sq |   .0119936    .020702     0.58   0.562    -.0285816    .0525688
                   KOFGIlag1 |  -.0150716   .0113399    -1.33   0.184    -.0372975    .0071542
                KOFGIlag1_sq |   .0004232   .0001104     3.83   0.000     .0002068    .0006396
              populationlag1 |   .0483511   .0409034     1.18   0.237    -.0318181    .1285202
      UCDP_armedConflictlag1 |   -.101066   .0766994    -1.32   0.188     -.251394     .049262
                       _cons |   2.997803   .3179598     9.43   0.000     2.374613    3.620993
----------------------------------------------------------------------------------------------
Instrumented:  RESTRICT_COUNTdomlag1 RESTRICT_COUNTdomlag1_sq PTS_Slag1 hrnewslag1
               protest_ClarkRegan_loglag1
Instruments:   PR_freedomHouselag1 PR_freedomHouselag1_sq gdp_pc_constantUS2010lag1
               gdp_pc_constantUS2010lag1_sq KOFGIlag1 KOFGIlag1_sq populationlag1
               UCDP_armedConflictlag1 RESTRICT_COUNTdomlag2 RESTRICT_COUNTdomlag3
               RESTRICT_COUNTdomlag2_sq PTS_Slag2 PTS_Slag3 hrnewslag2
               protest_ClarkRegan_loglag2

. #delimit cr
delimiter now cr
. estat overid 

  Test of overidentifying restriction:

  Hansen's J chi2(2) = .198904 (p = 0.9053)

. 
. mat es_ic = r(J) 

. matrix list es_ic

symmetric es_ic[1,1]
           c1
r1  .19890449

. local J: display %4.1f es_ic[1,1]

. outreg2 using ".\Tables\Appendix_TableS9a.doc", append ///
>  ctitle("Model 4") label  eqdrop(lnalpha) dec(3) ///
> alpha(0.001, 0.01, 0.05, 0.1) symbol(***,**, *, +) ///
> addtext(Hansen's J, `J')
.\Tables\Appendix_TableS9a.doc
dir : seeout

. 
. margins, at(RESTRICT_COUNTdomlag1 = (0 4) RESTRICT_COUNTdomlag1_sq = (0 16)) contrast(atcontrast(r)) //    5.640214   2.477502
>       .7843994    10.49603

Contrasts of predictive margins
Model VCE    : Bootstrap

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           0
               RESTRIC~1_sq    =           0

2._at        : RESTRI~mlag1    =           0
               RESTRIC~1_sq    =          16

3._at        : RESTRI~mlag1    =           4
               RESTRIC~1_sq    =           0

4._at        : RESTRI~mlag1    =           4
               RESTRIC~1_sq    =          16

------------------------------------------------
             |         df        chi2     P>chi2
-------------+----------------------------------
         _at |
   (2 vs 1)  |          1        2.43     0.1194
   (3 vs 1)  |          1        1.26     0.2617
   (4 vs 1)  |          1        0.75     0.3863
      Joint  |          3     2155.44     0.0000
------------------------------------------------

--------------------------------------------------------------
             |            Delta-method
             |   Contrast   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
         _at |
   (2 vs 1)  |  -7.198464   4.622155     -16.25772    1.860792
   (3 vs 1)  |   14.68203   13.08058     -10.95543     40.3195
   (4 vs 1)  |   5.953216   6.871363     -7.514409    19.42084
--------------------------------------------------------------

. margins, at(RESTRICT_COUNTdomlag1 = (4 10) RESTRICT_COUNTdomlag1_sq = (16 100)) contrast(atcontrast(r))  // -3.854784   1.8313
> 16     -7.444098   -.2654707

Contrasts of predictive margins
Model VCE    : Bootstrap

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           4
               RESTRIC~1_sq    =          16

2._at        : RESTRI~mlag1    =           4
               RESTRIC~1_sq    =         100

3._at        : RESTRI~mlag1    =          10
               RESTRIC~1_sq    =          16

4._at        : RESTRI~mlag1    =          10
               RESTRIC~1_sq    =         100

------------------------------------------------
             |         df        chi2     P>chi2
-------------+----------------------------------
         _at |
   (2 vs 1)  |          1        3.07     0.0797
   (3 vs 1)  |          1        0.96     0.3284
   (4 vs 1)  |          1        2.49     0.1146
      Joint  |          3     2155.44     0.0000
------------------------------------------------

--------------------------------------------------------------
             |            Delta-method
             |   Contrast   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
         _at |
   (2 vs 1)  |  -32.92543   18.79049      -69.7541     3.90325
   (3 vs 1)  |   25.15108   25.73581     -25.29017    75.59234
   (4 vs 1)  |  -18.81369   11.92332     -42.18296    4.555576
--------------------------------------------------------------

.  
. margins, at(RESTRICT_COUNTdomlag1 = 0 RESTRICT_COUNTdomlag1_sq = 0 ) ///
>                  at(RESTRICT_COUNTdomlag1 = 1 RESTRICT_COUNTdomlag1_sq = 1 ) ///
>                  at(RESTRICT_COUNTdomlag1 = 2 RESTRICT_COUNTdomlag1_sq = 4 ) ///
>                  at(RESTRICT_COUNTdomlag1 = 3 RESTRICT_COUNTdomlag1_sq = 9 ) ///
>                  at(RESTRICT_COUNTdomlag1 = 4 RESTRICT_COUNTdomlag1_sq = 16 ) ///
>                  at(RESTRICT_COUNTdomlag1 = 5 RESTRICT_COUNTdomlag1_sq = 25 ) ///
>                  at(RESTRICT_COUNTdomlag1 = 6 RESTRICT_COUNTdomlag1_sq = 36 ) ///
>                  at(RESTRICT_COUNTdomlag1 = 7 RESTRICT_COUNTdomlag1_sq = 49 ) ///
>                  at(RESTRICT_COUNTdomlag1 = 8 RESTRICT_COUNTdomlag1_sq = 64 ) ///
>                  at(RESTRICT_COUNTdomlag1 = 9 RESTRICT_COUNTdomlag1_sq = 81 ) ///
>                  at(RESTRICT_COUNTdomlag1 = 10 RESTRICT_COUNTdomlag1_sq = 100 ) level(95) post

Predictive margins                              Number of obs     =      1,246
Model VCE    : Bootstrap

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           0
               RESTRIC~1_sq    =           0

2._at        : RESTRI~mlag1    =           1
               RESTRIC~1_sq    =           1

3._at        : RESTRI~mlag1    =           2
               RESTRIC~1_sq    =           4

4._at        : RESTRI~mlag1    =           3
               RESTRIC~1_sq    =           9

5._at        : RESTRI~mlag1    =           4
               RESTRIC~1_sq    =          16

6._at        : RESTRI~mlag1    =           5
               RESTRIC~1_sq    =          25

7._at        : RESTRI~mlag1    =           6
               RESTRIC~1_sq    =          36

8._at        : RESTRI~mlag1    =           7
               RESTRIC~1_sq    =          49

9._at        : RESTRI~mlag1    =           8
               RESTRIC~1_sq    =          64

10._at       : RESTRI~mlag1    =           9
               RESTRIC~1_sq    =          81

11._at       : RESTRI~mlag1    =          10
               RESTRIC~1_sq    =         100

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   69.06118   2.181228    31.66   0.000     64.78605    73.33631
          2  |   71.97391   1.814425    39.67   0.000      68.4177    75.53012
          3  |   73.98447   3.338076    22.16   0.000     67.44196    80.52698
          4  |   75.01194   4.678085    16.03   0.000     65.84307    84.18082
          5  |    75.0144   5.534051    13.56   0.000     64.16786    85.86094
          6  |   73.99174   5.963525    12.41   0.000     62.30344    85.68003
          7  |   71.98569   6.194587    11.62   0.000     59.84452    84.12686
          8  |   69.07701    6.58243    10.49   0.000     56.17568    81.97833
          9  |   65.38005    7.45068     8.78   0.000     50.77698    79.98311
         10  |   61.03533   8.875132     6.88   0.000     43.64039    78.43027
         11  |    56.2007   10.68206     5.26   0.000     35.26424    77.13717
------------------------------------------------------------------------------

. marginsplot, recast(line) recastci(rarea) level(95) ///
> plotopt(color(gs0) lwidth(1) ) ///
> ciopt(color(gs6) fintensity(10) lcolor(gs16) ) ///
> xlabel(1 "0" 2 "1" 3 "2" 4 "3" 5 "4" 6 "5" 7 "6" 8 "7" 9 "8" 10 "9" 11 "10") ///
> xtitle("Count of restriction types", size(large)) ///
> ytitle("Predicted number of human rights groups", size(large)) ///
> title("Number of CSOs", size(large)) subtitle("-- Poisson with GMM (all EEVs) --", size(large)) ///
> scheme(s1mono)

  Variables that uniquely identify margins: _atopt
  Multiple at() options specified:
      _atoption=1: RESTRICT_COUNTdomlag1 = 0 RESTRICT_COUNTdomlag1_sq = 0
      _atoption=2: RESTRICT_COUNTdomlag1 = 1 RESTRICT_COUNTdomlag1_sq = 1
      _atoption=3: RESTRICT_COUNTdomlag1 = 2 RESTRICT_COUNTdomlag1_sq = 4
      _atoption=4: RESTRICT_COUNTdomlag1 = 3 RESTRICT_COUNTdomlag1_sq = 9
      _atoption=5: RESTRICT_COUNTdomlag1 = 4 RESTRICT_COUNTdomlag1_sq = 16
      _atoption=6: RESTRICT_COUNTdomlag1 = 5 RESTRICT_COUNTdomlag1_sq = 25
      _atoption=7: RESTRICT_COUNTdomlag1 = 6 RESTRICT_COUNTdomlag1_sq = 36
      _atoption=8: RESTRICT_COUNTdomlag1 = 7 RESTRICT_COUNTdomlag1_sq = 49
      _atoption=9: RESTRICT_COUNTdomlag1 = 8 RESTRICT_COUNTdomlag1_sq = 64
      _atoption=10: RESTRICT_COUNTdomlag1 = 9 RESTRICT_COUNTdomlag1_sq = 81
      _atoption=11: RESTRICT_COUNTdomlag1 = 10 RESTRICT_COUNTdomlag1_sq = 100

. graph export ".\Figures\Appendix_FigureS9a_2.png", replace
(file .\Figures\Appendix_FigureS9a_2.png written in PNG format)

. 
. 
. ******************
. ** Protest *******
. ******************
. 
. ** Table S9b
. 
. * Model 1: Negative binomial with robust standard errors
. #delimit ;
delimiter now ;
. nbreg protest_ClarkRegan c.RESTRICT_COUNTdomlag1##c.RESTRICT_COUNTdomlag1, vce(cluster cowcode) ;

Fitting Poisson model:

Iteration 0:   log pseudolikelihood =  -6991.606  
Iteration 1:   log pseudolikelihood = -6991.5756  
Iteration 2:   log pseudolikelihood = -6991.5756  

Fitting constant-only model:

Iteration 0:   log pseudolikelihood = -4433.6275  
Iteration 1:   log pseudolikelihood = -4296.7664  
Iteration 2:   log pseudolikelihood = -4296.1137  
Iteration 3:   log pseudolikelihood = -4296.1137  

Fitting full model:

Iteration 0:   log pseudolikelihood =  -4281.924  
Iteration 1:   log pseudolikelihood = -4281.6173  
Iteration 2:   log pseudolikelihood = -4281.6171  

Negative binomial regression                    Number of obs     =      2,022
                                                Wald chi2(2)      =       4.97
Dispersion           = mean                     Prob > chi2       =     0.0833
Log pseudolikelihood = -4281.6171               Pseudo R2         =     0.0034

                                                                 (Std. Err. adjusted for 157 clusters in cowcode)
-----------------------------------------------------------------------------------------------------------------
                                                |               Robust
                             protest_ClarkRegan |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
------------------------------------------------+----------------------------------------------------------------
                          RESTRICT_COUNTdomlag1 |   .1143168   .0818951     1.40   0.163    -.0461946    .2748283
                                                |
c.RESTRICT_COUNTdomlag1#c.RESTRICT_COUNTdomlag1 |  -.0193118   .0097263    -1.99   0.047     -.038375   -.0002487
                                                |
                                          _cons |   1.016099   .1213283     8.37   0.000     .7783001    1.253898
------------------------------------------------+----------------------------------------------------------------
                                       /lnalpha |    .697446   .0938238                      .5135547    .8813373
------------------------------------------------+----------------------------------------------------------------
                                          alpha |   2.008616   .1884561                      1.671221    2.414126
-----------------------------------------------------------------------------------------------------------------

. #delimit cr
delimiter now cr
. 
. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |      2,022 -4296.114  -4281.617       4    8571.234   8593.682
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. mat es_ic = r(S)

. mat list es_ic

es_ic[1,6]
            N         ll0          ll          df         AIC         BIC
.        2022  -4296.1137  -4281.6171           4   8571.2342   8593.6816

. local AIC: display %4.1f es_ic[1,5]

. local BIC: display %4.1f es_ic[1,6]

. local LL: display %4.1f es_ic[1,3]

. outreg2 using ".\Tables\Appendix_TableS9b.doc", replace ///
>  ctitle("Model 1") label  eqdrop(lnalpha) dec(3) ///
> alpha(0.001, 0.01, 0.05, 0.1) symbol(***,**, *, +) ///
> addtext(Log-Likelihood, `LL', BIC, `BIC', AIC, `AIC')
.\Tables\Appendix_TableS9b.doc
dir : seeout

. 
. 
. 
. * Model 2: Negative binomial with robust se
. #delimit ;
delimiter now ;
. nbreg protest_ClarkRegan c.RESTRICT_COUNTdomlag1##c.RESTRICT_COUNTdomlag1
> PTS_Slag1 hrnewslag1  UCDP_armedConflictlag1 
> PR_freedomHouselag1 PR_freedomHouselag1_sq 
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1, vce(cluster cowcode);

Fitting Poisson model:

Iteration 0:   log pseudolikelihood = -4671.8281  
Iteration 1:   log pseudolikelihood = -4663.5394  
Iteration 2:   log pseudolikelihood = -4663.4608  
Iteration 3:   log pseudolikelihood = -4663.4608  

Fitting constant-only model:

Iteration 0:   log pseudolikelihood = -3196.2945  
Iteration 1:   log pseudolikelihood = -3104.8959  
Iteration 2:   log pseudolikelihood =  -3104.463  
Iteration 3:   log pseudolikelihood =  -3104.463  

Fitting full model:

Iteration 0:   log pseudolikelihood = -3040.6741  
Iteration 1:   log pseudolikelihood = -3030.7579  
Iteration 2:   log pseudolikelihood = -3030.3632  
Iteration 3:   log pseudolikelihood = -3030.3628  
Iteration 4:   log pseudolikelihood = -3030.3628  

Negative binomial regression                    Number of obs     =      1,463
                                                Wald chi2(12)     =      47.34
Dispersion           = mean                     Prob > chi2       =     0.0000
Log pseudolikelihood = -3030.3628               Pseudo R2         =     0.0239

                                                                 (Std. Err. adjusted for 148 clusters in cowcode)
-----------------------------------------------------------------------------------------------------------------
                                                |               Robust
                             protest_ClarkRegan |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
------------------------------------------------+----------------------------------------------------------------
                          RESTRICT_COUNTdomlag1 |   .0905468   .0765031     1.18   0.237    -.0593965      .24049
                                                |
c.RESTRICT_COUNTdomlag1#c.RESTRICT_COUNTdomlag1 |  -.0150764   .0092486    -1.63   0.103    -.0332033    .0030505
                                                |
                                      PTS_Slag1 |   .3131851   .0903299     3.47   0.001     .1361419    .4902284
                                     hrnewslag1 |    .093327    .035158     2.65   0.008     .0244187    .1622353
                         UCDP_armedConflictlag1 |  -.1985981   .1853579    -1.07   0.284     -.561893    .1646968
                            PR_freedomHouselag1 |   -.051791   .2147824    -0.24   0.809    -.4727567    .3691747
                         PR_freedomHouselag1_sq |   -.006531   .0253242    -0.26   0.796    -.0561654    .0431035
                      gdp_pc_constantUS2010lag1 |   .2980022   .3748074     0.80   0.427    -.4366068    1.032611
                   gdp_pc_constantUS2010lag1_sq |  -.2159489     .09007    -2.40   0.017    -.3924829   -.0394149
                                      KOFGIlag1 |   .0089935   .0455633     0.20   0.844     -.080309     .098296
                                   KOFGIlag1_sq |  -.0000286   .0004531    -0.06   0.950    -.0009166    .0008595
                                 populationlag1 |   -.134766   .1370273    -0.98   0.325    -.4033346    .1338026
                                          _cons |   .2407214   1.143272     0.21   0.833    -2.000051    2.481494
------------------------------------------------+----------------------------------------------------------------
                                       /lnalpha |    .540169   .1107562                      .3230909    .7572472
------------------------------------------------+----------------------------------------------------------------
                                          alpha |   1.716297   .1900906                      1.381391    2.132398
-----------------------------------------------------------------------------------------------------------------

. #delimit cr
delimiter now cr
. 
. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |      1,463 -3104.463  -3030.363      14    6088.726   6162.761
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. mat es_ic = r(S)

. local AIC: display %4.1f es_ic[1,5]

. local BIC: display %4.1f es_ic[1,6]

. local LL: display %4.1f es_ic[1,3]

. outreg2 using  ".\Tables\Appendix_TableS9b.doc", append ///
>  ctitle("Model 2") label  eqdrop(lnalpha) dec(3) ///
> alpha(0.001, 0.01, 0.05, 0.1) symbol(***,**, *, +) ///
> addtext(Log-Likelihood, `LL', BIC, `BIC', AIC, `AIC')
.\Tables\Appendix_TableS9b.doc
dir : seeout

. 
. margins, at(RESTRICT_COUNTdomlag1 = (0 3)) contrast(atcontrast(r)) //     .3340292   .4830276     -.6126876    1.280746

Contrasts of predictive margins
Model VCE    : Robust

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           0

2._at        : RESTRI~mlag1    =           3

------------------------------------------------
             |         df        chi2     P>chi2
-------------+----------------------------------
         _at |          1        0.68     0.4109
------------------------------------------------

--------------------------------------------------------------
             |            Delta-method
             |   Contrast   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
         _at |
   (2 vs 1)  |   .4007778   .4873942     -.5544972    1.356053
--------------------------------------------------------------

. margins, at(RESTRICT_COUNTdomlag1 = (3 10)) contrast(atcontrast(r)) //   -.8653467   .8708952      -2.57227    .8415765

Contrasts of predictive margins
Model VCE    : Robust

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           3

2._at        : RESTRI~mlag1    =          10

------------------------------------------------
             |         df        chi2     P>chi2
-------------+----------------------------------
         _at |          1        4.43     0.0353
------------------------------------------------

--------------------------------------------------------------
             |            Delta-method
             |   Contrast   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
         _at |
   (2 vs 1)  |  -1.645749   .7819006     -3.178246   -.1132523
--------------------------------------------------------------

. 
. margins, at(RESTRICT_COUNTdomlag1 = (0(1)10) ) post

Predictive margins                              Number of obs     =      1,463
Model VCE    : Robust

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           0

2._at        : RESTRI~mlag1    =           1

3._at        : RESTRI~mlag1    =           2

4._at        : RESTRI~mlag1    =           3

5._at        : RESTRI~mlag1    =           4

6._at        : RESTRI~mlag1    =           5

7._at        : RESTRI~mlag1    =           6

8._at        : RESTRI~mlag1    =           7

9._at        : RESTRI~mlag1    =           8

10._at       : RESTRI~mlag1    =           9

11._at       : RESTRI~mlag1    =          10

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   2.752064   .3010562     9.14   0.000     2.162005    3.342123
          2  |   2.967802   .2876963    10.32   0.000     2.403928    3.531676
          3  |    3.10539   .3584371     8.66   0.000     2.402866    3.807914
          4  |   3.152842   .4388311     7.18   0.000     2.292749    4.012935
          5  |    3.10594    .493339     6.30   0.000     2.139013    4.072867
          6  |   2.968854   .5195706     5.71   0.000     1.950514    3.987193
          7  |   2.753527   .5321885     5.17   0.000     1.710457    3.796597
          8  |   2.477963   .5499374     4.51   0.000     1.400105     3.55582
          9  |   2.163739   .5814614     3.72   0.000     1.024096    3.303383
         10  |   1.833243   .6194859     2.96   0.003     .6190729    3.047413
         11  |   1.507092   .6485254     2.32   0.020      .236006    2.778179
------------------------------------------------------------------------------

. marginsplot, recast(line) recastci(rarea)  ///
> plotopt(color(gs0) lwidth(1) ) ///
> ciopt(color(gs6) fintensity(10) lcolor(gs16) ) ///
> xtitle("Count of restriction types", size(large)) ///
> ytitle("Predicted number of protest events", size(large)) ///
> title("Nunber of Protest Events", size(large)) ///
> subtitle("-- Negative Binomial --", size(large)) ///
> scheme(s1mono)

  Variables that uniquely identify margins: RESTRICT_COUNTdomlag1

. graph export ".\Figures\Manuscript_Figure5.png", replace
(file .\Figures\Manuscript_Figure5.png written in PNG format)

. 
. 
. * Model 3: Zero inflated negative binomial 
. set seed 1

. #delimit ;
delimiter now ;
. zinb protest_ClarkRegan c.RESTRICT_COUNTdomlag1##c.RESTRICT_COUNTdomlag1
> PTS_Slag1 hrnewslag1 UCDP_armedConflictlag1 
> PR_freedomHouselag1 PR_freedomHouselag1_sq 
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1, 
> inflate(fhbest fhworst gdp_pc_constantUS2010lag1 )
> vce(cluster cowcode);

Fitting constant-only model:

Iteration 0:   log pseudolikelihood = -3321.4531  
Iteration 1:   log pseudolikelihood = -3093.3906  
Iteration 2:   log pseudolikelihood = -3060.0252  
Iteration 3:   log pseudolikelihood = -3049.0308  
Iteration 4:   log pseudolikelihood = -3046.6354  
Iteration 5:   log pseudolikelihood = -3046.3554  
Iteration 6:   log pseudolikelihood = -3046.3535  
Iteration 7:   log pseudolikelihood = -3046.3535  

Fitting full model:

Iteration 0:   log pseudolikelihood = -3046.3535  
Iteration 1:   log pseudolikelihood = -3006.8918  
Iteration 2:   log pseudolikelihood = -2996.2374  
Iteration 3:   log pseudolikelihood = -2996.1671  
Iteration 4:   log pseudolikelihood = -2996.1665  
Iteration 5:   log pseudolikelihood = -2996.1665  

Zero-inflated negative binomial regression      Number of obs     =      1,463
                                                Nonzero obs       =        895
                                                Zero obs          =        568

Inflation model      = logit                    Wald chi2(12)     =      46.88
Log pseudolikelihood = -2996.167                Prob > chi2       =     0.0000

                                                                 (Std. Err. adjusted for 148 clusters in cowcode)
-----------------------------------------------------------------------------------------------------------------
                                                |               Robust
                             protest_ClarkRegan |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
------------------------------------------------+----------------------------------------------------------------
protest_ClarkRegan                              |
                          RESTRICT_COUNTdomlag1 |   .0591235   .0754895     0.78   0.434    -.0888331    .2070801
                                                |
c.RESTRICT_COUNTdomlag1#c.RESTRICT_COUNTdomlag1 |  -.0094142   .0093352    -1.01   0.313     -.027711    .0088825
                                                |
                                      PTS_Slag1 |   .3090893   .0904568     3.42   0.001     .1317972    .4863814
                                     hrnewslag1 |   .0884279   .0370855     2.38   0.017     .0157416    .1611142
                         UCDP_armedConflictlag1 |  -.1840047   .1861378    -0.99   0.323    -.5488279    .1808186
                            PR_freedomHouselag1 |  -.0749216    .219856    -0.34   0.733    -.5058315    .3559883
                         PR_freedomHouselag1_sq |   .0020849   .0253616     0.08   0.934    -.0476229    .0517926
                      gdp_pc_constantUS2010lag1 |   .4713763   .4407613     1.07   0.285    -.3924999    1.335253
                   gdp_pc_constantUS2010lag1_sq |  -.1132203    .180651    -0.63   0.531    -.4672898    .2408493
                                      KOFGIlag1 |   .0224311   .0527633     0.43   0.671     -.080983    .1258453
                                   KOFGIlag1_sq |  -.0001991   .0005259    -0.38   0.705    -.0012298    .0008316
                                 populationlag1 |  -.1455184   .1292725    -1.13   0.260    -.3988879    .1078511
                                          _cons |   .0826488   1.318486     0.06   0.950    -2.501536    2.666833
------------------------------------------------+----------------------------------------------------------------
inflate                                         |
                                         fhbest |  -.8317678   .9864886    -0.84   0.399     -2.76525    1.101714
                                        fhworst |   3.218846   .9044754     3.56   0.000     1.446106    4.991585
                      gdp_pc_constantUS2010lag1 |   1.483012   .3834166     3.87   0.000     .7315297    2.234495
                                          _cons |  -2.906515   .8119679    -3.58   0.000    -4.497943   -1.315087
------------------------------------------------+----------------------------------------------------------------
                                       /lnalpha |   .2867136   .1166317     2.46   0.014     .0581197    .5153076
------------------------------------------------+----------------------------------------------------------------
                                          alpha |   1.332043   .1553584                      1.059842    1.674153
-----------------------------------------------------------------------------------------------------------------

. #delimit cr
delimiter now cr
. 
. 
. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |      1,463 -3046.353  -2996.167      18    6028.333   6123.521
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. mat es_ic = r(S)

. local AIC: display %4.1f es_ic[1,5]

. local BIC: display %4.1f es_ic[1,6]

. local LL: display %4.1f es_ic[1,3]

. outreg2 using  ".\Tables\Appendix_TableS9b.doc", append ///
>  ctitle("Model 3") label  eqdrop(lnalpha) dec(3) ///
> alpha(0.001, 0.01, 0.05, 0.1) symbol(***,**, *, +) ///
> addtext(Log-Likelihood, `LL', BIC, `BIC', AIC, `AIC')
.\Tables\Appendix_TableS9b.doc
dir : seeout

. 
. margins, at(RESTRICT_COUNTdomlag1 = (0(1)10) ) post

Predictive margins                              Number of obs     =      1,463
Model VCE    : Robust

Expression   : Predicted number of events, predict()

1._at        : RESTRI~mlag1    =           0

2._at        : RESTRI~mlag1    =           1

3._at        : RESTRI~mlag1    =           2

4._at        : RESTRI~mlag1    =           3

5._at        : RESTRI~mlag1    =           4

6._at        : RESTRI~mlag1    =           5

7._at        : RESTRI~mlag1    =           6

8._at        : RESTRI~mlag1    =           7

9._at        : RESTRI~mlag1    =           8

10._at       : RESTRI~mlag1    =           9

11._at       : RESTRI~mlag1    =          10

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   2.723936   .2943237     9.25   0.000     2.147072      3.3008
          2  |   2.862763   .2757484    10.38   0.000     2.322306     3.40322
          3  |   2.952546   .3389252     8.71   0.000     2.288265    3.616827
          4  |   2.988347    .414627     7.21   0.000     2.175693    3.801001
          5  |   2.968166   .4737085     6.27   0.000     2.039714    3.896617
          6  |   2.893132   .5167238     5.60   0.000     1.880372    3.905892
          7  |   2.767395   .5582297     4.96   0.000     1.673285    3.861505
          8  |   2.597748    .615219     4.22   0.000     1.391941    3.803555
          9  |   2.393017   .6953334     3.44   0.001     1.030189    3.755846
         10  |   2.163304    .792326     2.73   0.006     .6103734    3.716234
         11  |   1.919164   .8914348     2.15   0.031     .1719839    3.666344
------------------------------------------------------------------------------

. marginsplot, recast(line) recastci(rarea)  ///
> yscale(range(0 4))  ylabel(0(1)4) ///
> plotopt(color(gs0) lwidth(1) ) ///
> ciopt(color(gs6) fintensity(10) lcolor(gs16) ) ///
> xtitle("Count of restriction types", size(large)) ///
> ytitle("Predicted number of protest events", size(large)) ///
> title("Number of Protest Events ", size(large)) ///
> subtitle("-- Zero-infl. Negative Binomial --", size(large)) ///
> scheme(s1mono)

  Variables that uniquely identify margins: RESTRICT_COUNTdomlag1

. graph export ".\Figures\Appendix_FigureS9b_1.png", replace
(file .\Figures\Appendix_FigureS9b_1.png written in PNG format)

. 
. 
. 
. * Model 4: Linear regression
. #delimit ;
delimiter now ;
. reg protest_ClarkRegan_log c.RESTRICT_COUNTdomlag1##c.RESTRICT_COUNTdomlag1, vce(cluster cowcode);

Linear regression                               Number of obs     =      2,022
                                                F(2, 156)         =      10.09
                                                Prob > F          =     0.0001
                                                R-squared         =     0.0279
                                                Root MSE          =     .87788

                                                                 (Std. Err. adjusted for 157 clusters in cowcode)
-----------------------------------------------------------------------------------------------------------------
                                                |               Robust
                         protest_ClarkRegan_log |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
------------------------------------------------+----------------------------------------------------------------
                          RESTRICT_COUNTdomlag1 |   .1015775   .0493621     2.06   0.041     .0040731    .1990818
                                                |
c.RESTRICT_COUNTdomlag1#c.RESTRICT_COUNTdomlag1 |  -.0151905   .0050203    -3.03   0.003    -.0251071    -.005274
                                                |
                                          _cons |    .872411   .0617075    14.14   0.000      .750521     .994301
-----------------------------------------------------------------------------------------------------------------

. #delimit cr
delimiter now cr
. 
. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |      2,022  -2632.86  -2604.236       3    5214.472   5231.307
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. mat es_ic = r(S)

. local AIC: display %4.1f es_ic[1,5]

. local BIC: display %4.1f es_ic[1,6]

. local LL: display %4.1f es_ic[1,3]

. outreg2 using ".\Tables\Appendix_TableS9b.doc", append ///
>  ctitle("Model 4") label  eqdrop(lnalpha) dec(3) ///
> alpha(0.001, 0.01, 0.05, 0.1) symbol(***,**, *, +) ///
> addtext(Log-Likelihood, `LL', BIC, `BIC', AIC, `AIC')
.\Tables\Appendix_TableS9b.doc
dir : seeout

. 
. 
. * Model 5: Linear regression, full
. #delimit ;
delimiter now ;
. reg protest_ClarkRegan_log c.RESTRICT_COUNTdomlag1##c.RESTRICT_COUNTdomlag1
> PTS_Slag1 hrnewslag1  UCDP_armedConflictlag1 
> PR_freedomHouselag1 PR_freedomHouselag1_sq 
> gdp_pc_constantUS2010lag1 gdp_pc_constantUS2010lag1_sq 
> KOFGIlag1 KOFGIlag1_sq populationlag1, vce(cluster cowcode);

Linear regression                               Number of obs     =      1,463
                                                F(12, 147)        =       9.81
                                                Prob > F          =     0.0000
                                                R-squared         =     0.1170
                                                Root MSE          =     .83305

                                                                 (Std. Err. adjusted for 148 clusters in cowcode)
-----------------------------------------------------------------------------------------------------------------
                                                |               Robust
                         protest_ClarkRegan_log |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
------------------------------------------------+----------------------------------------------------------------
                          RESTRICT_COUNTdomlag1 |   .0743848   .0479558     1.55   0.123     -.020387    .1691566
                                                |
c.RESTRICT_COUNTdomlag1#c.RESTRICT_COUNTdomlag1 |  -.0100931   .0048558    -2.08   0.039    -.0196893   -.0004969
                                                |
                                      PTS_Slag1 |   .1795942   .0549459     3.27   0.001     .0710084    .2881801
                                     hrnewslag1 |   .0768387   .0177788     4.32   0.000     .0417036    .1119738
                         UCDP_armedConflictlag1 |   -.200297   .1209631    -1.66   0.100    -.4393483    .0387544
                            PR_freedomHouselag1 |   -.028549    .118061    -0.24   0.809    -.2618651    .2047671
                         PR_freedomHouselag1_sq |  -.0074465   .0140437    -0.53   0.597    -.0352001    .0203072
                      gdp_pc_constantUS2010lag1 |   .0479624   .1454193     0.33   0.742      -.23942    .3353448
                   gdp_pc_constantUS2010lag1_sq |   -.051962   .0319347    -1.63   0.106    -.1150725    .0111485
                                      KOFGIlag1 |   .0257949   .0218114     1.18   0.239    -.0173096    .0688994
                                   KOFGIlag1_sq |   -.000217   .0002132    -1.02   0.310    -.0006382    .0002043
                                 populationlag1 |  -.0521455   .0804283    -0.65   0.518    -.2110905    .1067996
                                          _cons |  -.0051353   .5950506    -0.01   0.993    -1.181094    1.170824
-----------------------------------------------------------------------------------------------------------------

. #delimit cr
delimiter now cr
. 
. estat ic

Akaike's information criterion and Bayesian information criterion

-----------------------------------------------------------------------------
       Model |        Obs  ll(null)  ll(model)      df         AIC        BIC
-------------+---------------------------------------------------------------
           . |      1,463 -1893.136  -1802.147      13    3630.295   3699.042
-----------------------------------------------------------------------------
               Note: N=Obs used in calculating BIC; see [R] BIC note.

. mat es_ic = r(S)

. local AIC: display %4.1f es_ic[1,5]

. local BIC: display %4.1f es_ic[1,6]

. local LL: display %4.1f es_ic[1,3]

. outreg2 using ".\Tables\Appendix_TableS9b.doc", append ///
>  ctitle("Model 5") label  eqdrop(lnalpha) dec(3) ///
> alpha(0.001, 0.01, 0.05, 0.1) symbol(***,**, *, +) ///
> addtext(Log-Likelihood, `LL', BIC, `BIC', AIC, `AIC')
.\Tables\Appendix_TableS9b.doc
dir : seeout

. 
. 
. margins, at(RESTRICT_COUNTdomlag1 = (0(1)10) ) post

Predictive margins                              Number of obs     =      1,463
Model VCE    : Robust

Expression   : Linear prediction, predict()

1._at        : RESTRI~mlag1    =           0

2._at        : RESTRI~mlag1    =           1

3._at        : RESTRI~mlag1    =           2

4._at        : RESTRI~mlag1    =           3

5._at        : RESTRI~mlag1    =           4

6._at        : RESTRI~mlag1    =           5

7._at        : RESTRI~mlag1    =           6

8._at        : RESTRI~mlag1    =           7

9._at        : RESTRI~mlag1    =           8

10._at       : RESTRI~mlag1    =           9

11._at       : RESTRI~mlag1    =          10

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   .8648801   .0636841    13.58   0.000     .7390256    .9907346
          2  |   .9291718   .0527103    17.63   0.000     .8250039     1.03334
          3  |   .9732773   .0656839    14.82   0.000     .8434707    1.103084
          4  |   .9971965   .0831152    12.00   0.000     .8329415    1.161452
          5  |    1.00093   .0967992    10.34   0.000     .8096318    1.192227
          6  |   .9844764   .1052449     9.35   0.000     .7764879    1.192465
          7  |    .947837   .1094054     8.66   0.000     .7316265    1.164047
          8  |   .8910113   .1120592     7.95   0.000     .6695561    1.112467
          9  |   .8139994   .1179562     6.90   0.000     .5808905    1.047108
         10  |   .7168013   .1329607     5.39   0.000       .45404    .9795627
         11  |    .599417   .1614238     3.71   0.000     .2804058    .9184282
------------------------------------------------------------------------------

. marginsplot, recast(line) recastci(rarea)  ///
> plotopt(color(gs0) lwidth(1) ) ///
> ciopt(color(gs6) fintensity(10) lcolor(gs16) ) ///
> xtitle("Count of restriction types", size(large)) ///
> ytitle("Predicted number of protest events", size(large)) ///
> title("Nunber of Protest Events", size(large)) ///
> subtitle("-- OLS with covariates --", size(large)) ///
> scheme(s1mono)

  Variables that uniquely identify margins: RESTRICT_COUNTdomlag1

. graph export ".\Figures\Appendix_FigureS9b_2.png", replace
(file .\Figures\Appendix_FigureS9b_2.png written in PNG format)

. 
. 
. log close
      name:  <unnamed>
       log:  C:\Users\hanna\Dropbox\PC\Documents\PaperProjects\Paper-Effective resistance\Code\ReplicationMaterial\Output_Main.l
> og
  log type:  text
 closed on:  17 Oct 2019, 09:41:04
--------------------------------------------------------------------------------------------------------------------------------
